org.milyn.javabean.factory
Class BasicFactoryDefinitionParser

java.lang.Object
  extended by org.milyn.javabean.factory.AbstractCachingFactoryDefinitionParser
      extended by 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:

  1. some.package.SomeFactory#createObject
    This defines that the 'createObject' of the class 'some.package.SomeFactory' should be called for creating the target object.
  2. 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.milyn.javabean.factory.FactoryDefinitionParser
FactoryDefinitionParser.FactoryDefinitionParserFactory
 
Constructor Summary
BasicFactoryDefinitionParser()
           
 
Method Summary
protected  Factory<?> createFactory(String factoryDefinition)
          Parses the factory definition and creates a StaticMethodFactory or FactoryInstanceFactory# accordingly.
 
Methods inherited from class org.milyn.javabean.factory.AbstractCachingFactoryDefinitionParser
parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFactoryDefinitionParser

public BasicFactoryDefinitionParser()
Method Detail

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.