Package org.eclipse.net4j.util.factory
Class AnnotationFactory<PRODUCT>
java.lang.Object
org.eclipse.net4j.util.factory.Factory
org.eclipse.net4j.util.factory.TreeFactory
org.eclipse.net4j.util.factory.TreeFactory.ContainerAware
org.eclipse.net4j.util.factory.AnnotationFactory<PRODUCT>
- All Implemented Interfaces:
IManagedContainer.ContainerAware,IManagedContainerProvider,IFactory,IFactoryKeyAware,ITreeFactory
Creates products reflectively and configures them via product method annotations.
- Since:
- 3.23
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfacestatic @interfacestatic @interfacestatic @interfaceNested classes/interfaces inherited from class org.eclipse.net4j.util.factory.TreeFactory
TreeFactory.ContainerAware -
Field Summary
Fields inherited from class org.eclipse.net4j.util.factory.Factory
NO_DESCRIPTION -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationFactory(Class<PRODUCT> productType, String productGroup, String type) AnnotationFactory(Class<PRODUCT> productType, IFactoryKey key) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureProduct(PRODUCT product, Tree config) protected final PRODUCTprotected ObjectcreateElement(String productGroup, String type, String descriptionAttribute, Tree elementConfig, boolean singleton) protected PRODUCTcreateProduct(Tree config) protected StringgetElementType(Tree elementConfig, String factoryTypeAttribute, String defaultFactoryType) protected voidinjectAttribute(PRODUCT product, Tree config, Method method) protected voidinjectElement(PRODUCT product, Tree config, Method method) protected booleanMethods inherited from class org.eclipse.net4j.util.factory.TreeFactory.ContainerAware
getContainer, setManagedContainerMethods inherited from class org.eclipse.net4j.util.factory.TreeFactory
create, createDescription, createWithTree, getTreeFor, parseTree, productCreationException, productCreationException, xmlDeserialize, xmlSerializeMethods inherited from class org.eclipse.net4j.util.factory.Factory
getDescriptionFor, getFactoryKey, getKey, getProductGroup, getType, productCreationException, productCreationException, setFactoryKey, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.util.factory.IFactory
getDescriptionFor, getKey
-
Constructor Details
-
AnnotationFactory
-
AnnotationFactory
-
-
Method Details
-
getProductType
-
create
- Specified by:
createin classTreeFactory- Throws:
ProductCreationException
-
createProduct
- Throws:
Exception
-
configureProduct
- Throws:
Exception
-
injectAttribute
- Throws:
Exception
-
isEnumCaseSensitive
protected boolean isEnumCaseSensitive() -
injectElement
protected void injectElement(PRODUCT product, Tree config, Method method) throws IllegalAccessException, InvocationTargetException -
getElementType
-
createElement
protected Object createElement(String productGroup, String type, String descriptionAttribute, Tree elementConfig, boolean singleton) throws ProductCreationException - Throws:
ProductCreationException
-