public final class FactoryCreateBuilder extends Object
LinkedRuleBuilder.factoryCreate()
.Modifier and Type | Method and Description |
---|---|
protected FactoryCreateRule |
createRule()
Provides an instance of
Rule . |
R |
get()
Provides an instance of
Rule . |
String |
getNamespaceURI()
Returns the namespace URI for which this Rule is relevant, if any.
|
String |
getPattern()
Returns the rule pattern associated to this builder.
|
FactoryCreateBuilder |
ignoreCreateExceptions(boolean ignoreCreateExceptions)
Exceptions thrown by the object creation factory will be ignored or not.
|
FactoryCreateBuilder |
ofType(Class<? extends ObjectCreationFactory<?>> type)
Construct a factory create rule that will use the specified class to create an
ObjectCreationFactory
which will then be used to create an object and push it on the stack. |
FactoryCreateBuilder |
ofType(String className)
Construct a factory create rule that will use the specified class name to create an
ObjectCreationFactory
which will then be used to create an object and push it on the stack. |
FactoryCreateBuilder |
overriddenByAttribute(String attributeName)
Allows specify the attribute containing an override class name if it is present.
|
protected void |
reportError(String methodChain,
String message) |
LinkedRuleBuilder |
then()
Come back to the main
LinkedRuleBuilder . |
<T> FactoryCreateBuilder |
usingFactory(ObjectCreationFactory<T> creationFactory)
Construct a factory create rule using the given, already instantiated,
ObjectCreationFactory . |
public FactoryCreateBuilder ofType(String className)
ObjectCreationFactory
which will then be used to create an object and push it on the stack.className
- Java class name of the object creation factory classpublic FactoryCreateBuilder ofType(Class<? extends ObjectCreationFactory<?>> type)
ObjectCreationFactory
which will then be used to create an object and push it on the stack.type
- Java class of the object creation factory classpublic <T> FactoryCreateBuilder usingFactory(ObjectCreationFactory<T> creationFactory)
ObjectCreationFactory
.T
- the type of created object by the given factorycreationFactory
- called on to create the objectpublic FactoryCreateBuilder overriddenByAttribute(String attributeName)
attributeName
- The attribute containing an override class name if it is presentpublic FactoryCreateBuilder ignoreCreateExceptions(boolean ignoreCreateExceptions)
ignoreCreateExceptions
- if true, exceptions thrown by the object creation factory will be ignoredprotected FactoryCreateRule createRule()
Rule
. Must never return null.public final LinkedRuleBuilder then()
LinkedRuleBuilder
.LinkedRuleBuilder
public final String getNamespaceURI()
public final R get()
Rule
. Must never return null.get
in interface RuleProvider<R extends Rule>
Rule
.protected final void reportError(String methodChain, String message)
public final String getPattern()
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.