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
Modifier and TypeClassDescriptionstatic @interface
static @interface
static @interface
static @interface
Nested 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
ConstructorDescriptionAnnotationFactory
(Class<PRODUCT> productType, String productGroup, String type) AnnotationFactory
(Class<PRODUCT> productType, IFactoryKey key) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureProduct
(PRODUCT product, Tree config) protected final PRODUCT
protected Object
createElement
(String productGroup, String type, String descriptionAttribute, Tree elementConfig, boolean singleton) protected PRODUCT
createProduct
(Tree config) protected String
getElementType
(Tree elementConfig, String factoryTypeAttribute, String defaultFactoryType) protected void
injectAttribute
(PRODUCT product, Tree config, Method method) protected void
injectElement
(PRODUCT product, Tree config, Method method) protected boolean
Methods inherited from class org.eclipse.net4j.util.factory.TreeFactory.ContainerAware
getContainer, setManagedContainer
Methods inherited from class org.eclipse.net4j.util.factory.TreeFactory
create, createDescription, createWithTree, getTreeFor, parseTree, productCreationException, productCreationException, xmlDeserialize, xmlSerialize
Methods inherited from class org.eclipse.net4j.util.factory.Factory
getDescriptionFor, getFactoryKey, getKey, getProductGroup, getType, productCreationException, productCreationException, setFactoryKey, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.factory.IFactory
getDescriptionFor, getKey
-
Constructor Details
-
AnnotationFactory
-
AnnotationFactory
-
-
Method Details
-
getProductType
-
create
- Specified by:
create
in 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
-