Class FactoryCreateBuilder
java.lang.Object
org.apache.commons.digester3.binder.FactoryCreateBuilder
- All Implemented Interfaces:
RuleProvider<FactoryCreateRule>
Builder chained when invoking
LinkedRuleBuilder.factoryCreate().- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionprotected FactoryCreateRuleProvides an instance ofRule.final FactoryCreateRuleget()Provides an instance ofRule.final StringReturns the namespace URI for which this Rule is relevant, if any.final StringReturns the rule pattern associated to this builder.ignoreCreateExceptions(boolean ignoreCreateExceptions) Exceptions thrown by the object creation factory will be ignored or not.ofType(Class<? extends ObjectCreationFactory<?>> type) Construct a factory create rule that will use the specified class to create anObjectCreationFactorywhich will then be used to create an object and push it on the stack.Construct a factory create rule that will use the specified class name to create anObjectCreationFactorywhich will then be used to create an object and push it on the stack.overriddenByAttribute(String attributeName) Allows specify the attribute containing an override class name if it is present.protected final voidreportError(String methodChain, String message) final LinkedRuleBuilderthen()Come back to the mainLinkedRuleBuilder.usingFactory(ObjectCreationFactory<T> creationFactory) Construct a factory create rule using the given, already instantiated,ObjectCreationFactory.
-
Method Details
-
ofType
Construct a factory create rule that will use the specified class name to create anObjectCreationFactorywhich will then be used to create an object and push it on the stack.- Parameters:
className- Java class name of the object creation factory class- Returns:
- this builder instance
-
ofType
Construct a factory create rule that will use the specified class to create anObjectCreationFactorywhich will then be used to create an object and push it on the stack.- Parameters:
type- Java class of the object creation factory class- Returns:
- this builder instance
-
usingFactory
Construct a factory create rule using the given, already instantiated,ObjectCreationFactory.- Type Parameters:
T- the type of created object by the given factory- Parameters:
creationFactory- called on to create the object- Returns:
- this builder instance
-
overriddenByAttribute
Allows specify the attribute containing an override class name if it is present.- Parameters:
attributeName- The attribute containing an override class name if it is present- Returns:
- this builder instance
-
ignoreCreateExceptions
Exceptions thrown by the object creation factory will be ignored or not.- Parameters:
ignoreCreateExceptions- if true, exceptions thrown by the object creation factory will be ignored- Returns:
- this builder instance
-
createRule
-
then
Come back to the mainLinkedRuleBuilder.- Returns:
- the main
LinkedRuleBuilder
-
getNamespaceURI
Returns the namespace URI for which this Rule is relevant, if any.- Returns:
- The namespace URI for which this Rule is relevant, if any
-
get
Provides an instance ofRule. Must never return null.- Specified by:
getin interfaceRuleProvider<R extends Rule>- Returns:
- an instance of
Rule.
-
reportError
-
getPattern
Returns the rule pattern associated to this builder.- Returns:
- The rule pattern associated to this builder
-