java.lang.Object
org.praxislive.base.AbstractComponentFactory
- All Implemented Interfaces:
ComponentFactory
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.praxislive.core.services.ComponentFactory
ComponentFactory.Deprecated, ComponentFactory.Redirect -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidadd(String type, AbstractComponentFactory.Data<? extends Component> info) protected voidprotected voidaddRoot(String type, AbstractComponentFactory.Data<? extends Root> info) final LookupcomponentData(ComponentType type) Query the data associated with this component type.final Stream<ComponentType> Component types provided by this factory.final ComponentcreateComponent(ComponentType type) Create an instance of the component associated with this type.final RootcreateRoot(ComponentType type) Create an instance of the root associated with this type.static <T> AbstractComponentFactory.Data<T> final LookuprootData(ComponentType type) Query the data associated with this root type.final Stream<ComponentType> Root types provided by this factory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.praxislive.core.services.ComponentFactory
componentRedirect, rootRedirect
-
Constructor Details
-
AbstractComponentFactory
protected AbstractComponentFactory()
-
-
Method Details
-
componentTypes
Description copied from interface:ComponentFactoryComponent types provided by this factory.- Specified by:
componentTypesin interfaceComponentFactory- Returns:
- stream of component types
-
rootTypes
Description copied from interface:ComponentFactoryRoot types provided by this factory.- Specified by:
rootTypesin interfaceComponentFactory- Returns:
- stream of root types
-
createComponent
Description copied from interface:ComponentFactoryCreate an instance of the component associated with this type. Component factories with a redirect may not support this method, and always throw an exception. The default implementation always throws an exception.- Specified by:
createComponentin interfaceComponentFactory- Parameters:
type- component type to create- Returns:
- created component instance
- Throws:
ComponentInstantiationException
-
createRoot
Description copied from interface:ComponentFactoryCreate an instance of the root associated with this type. Component factories with a redirect may not support this method, and always throw an exception. The default implementation always throws an exception.- Specified by:
createRootin interfaceComponentFactory- Parameters:
type- root type to create- Returns:
- created root instance
- Throws:
ComponentInstantiationException
-
componentData
Description copied from interface:ComponentFactoryQuery the data associated with this component type.- Specified by:
componentDatain interfaceComponentFactory- Parameters:
type- component type- Returns:
- lookup of data
-
rootData
Description copied from interface:ComponentFactoryQuery the data associated with this root type.- Specified by:
rootDatain interfaceComponentFactory- Parameters:
type- root type- Returns:
- lookup of data
-
add
-
add
-
addRoot
-
addRoot
-
data
-