@Alias(value="basic") public class BasicFactoryDefinitionParser extends AbstractCachingFactoryDefinitionParser
null
. This
will result in a NullPointerException
.
Modifier and Type | Class and Description |
---|---|
protected static class |
BasicFactoryDefinitionParser.FactoryInstanceFactory
The FactoryInstanceFactory uses a static method to retrieve the factory object and
then calls the factory method on the factory object to create the target objects.
|
protected static class |
BasicFactoryDefinitionParser.StaticMethodFactory
The StaticMethodFactory uses a static factory method create the target objects.
|
FactoryDefinitionParser.FactoryDefinitionParserFactory
factoryCache
Constructor and Description |
---|
BasicFactoryDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
protected Factory<?> |
createFactory(String factoryDefinition)
Parses the factory definition and creates a
BasicFactoryDefinitionParser.StaticMethodFactory
or FactoryInstanceFactory# accordingly. |
protected Factory<?> |
createFactoryInstanceFactory(String factoryDefinition,
String className,
String staticGetInstanceMethodDef,
String factoryMethodDef)
Creates a FactoryInstanceFactory object.
|
protected InvalidFactoryDefinitionException |
createInvalidDefinitionException(String factoryDefinition) |
protected Factory<?> |
createStaticMethodFactory(String factoryDefinition,
String className,
String methodDef)
Creates a StaticMethodFactory object.
|
protected static String |
toClassDefinition(Method method) |
parse
protected Factory<?> createFactory(String factoryDefinition)
BasicFactoryDefinitionParser.StaticMethodFactory
or FactoryInstanceFactory#
accordingly.createFactory
in class AbstractCachingFactoryDefinitionParser
protected Factory<?> createStaticMethodFactory(String factoryDefinition, String className, String methodDef) throws ClassNotFoundException, SecurityException, NoSuchMethodException
factoryDefinition
- className
- methodDef
- ClassNotFoundException
SecurityException
NoSuchMethodException
protected Factory<?> createFactoryInstanceFactory(String factoryDefinition, String className, String staticGetInstanceMethodDef, String factoryMethodDef) throws ClassNotFoundException, SecurityException, NoSuchMethodException
factoryDefinition
- className
- staticGetInstanceMethodDef
- factoryMethodDef
- ClassNotFoundException
SecurityException
NoSuchMethodException
protected InvalidFactoryDefinitionException createInvalidDefinitionException(String factoryDefinition)
Copyright © 2024. All rights reserved.