Package org.adempiere.base
Interface IMappedByNameFactory<T>
- Type Parameters:
T
-
- All Known Subinterfaces:
IMappedFormFactory
,IMappedProcessFactory
- All Known Implementing Classes:
MappedByNameFactory
,MappedFormFactory
,MappedProcessFactory
public interface IMappedByNameFactory<T>
Generic base interface for factory service that provide name/classname to instance mapping service
- Author:
- hengsin
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(String name, Supplier<T> supplier) add name to class mappinggetSupplier
(String name) default T
newInstance
(String name) void
removeMapping
(String name) remove name to class mapping
-
Method Details
-
addMapping
add name to class mapping- Parameters:
name
-supplier
-
-
removeMapping
remove name to class mapping- Parameters:
name
-
-
getSupplier
- Parameters:
name
-- Returns:
Supplier
-
newInstance
- Parameters:
name
-- Returns:
- new instance of T (if there are register supplier for name)
-