org.milyn.javabean.factory
Class BasicFactoryDefinitionParser
java.lang.Object
org.milyn.javabean.factory.AbstractCachingFactoryDefinitionParser
org.milyn.javabean.factory.BasicFactoryDefinitionParser
- All Implemented Interfaces:
- FactoryDefinitionParser
@Alias(value="basic")
public class BasicFactoryDefinitionParser
- extends AbstractCachingFactoryDefinitionParser
The BasicFactoryDefinitionParser supports two kinds of
factory definitions:
- some.package.SomeFactory#createObject
This defines that the 'createObject' of the class 'some.package.SomeFactory'
should be called for creating the target object.
- some.package.SomeFactorySingleton#getFactoryMethod.createObject
This defines that the 'getFactoryMethod' of the class 'some.package.SomeFactorySingleton'
should be called to retrieve the factory object on which the 'createObject' should
be called for creating the target object.
The factory retrieval method should never return null. This
will result in a NullPointerException.
- Author:
- maurice.zeijen@smies.com
|
Method Summary |
protected Factory<?> |
createFactory(String factoryDefinition)
Parses the factory definition and creates a StaticMethodFactory
or FactoryInstanceFactory# accordingly. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFactoryDefinitionParser
public BasicFactoryDefinitionParser()
createFactory
protected Factory<?> createFactory(String factoryDefinition)
- Parses the factory definition and creates a
StaticMethodFactory
or FactoryInstanceFactory# accordingly.
- Specified by:
createFactory in class AbstractCachingFactoryDefinitionParser
Copyright © 2018. All rights reserved.