Class ObjectCreateBuilder
java.lang.Object
org.apache.commons.digester3.binder.ObjectCreateBuilder
- All Implemented Interfaces:
RuleProvider<ObjectCreateRule>
Builder chained when invoking
LinkedRuleBuilder.createObject().- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectCreateRuleProvides an instance ofRule.final ObjectCreateRuleget()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.Construct an object with the specified class.Construct an object with the specified class name.ofTypeSpecifiedByAttribute(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.usingConstructor(Class<?>... constructorArgumentTypes) Allows users to specify constructor argument types.usingConstructor(String... paramTypeNames) Allows users to specify constructor argument type names.usingDefaultConstructorArguments(Object... defaultConstructorArguments) Allows users to specify default constructor arguments.
-
Method Details
-
ofType
Construct an object with the specified class name.- Parameters:
className- Java class name of the object to be created- Returns:
- this builder instance
-
ofType
Construct an object with the specified class.- Type Parameters:
T- any java type- Parameters:
type- Java class of the object to be created- Returns:
- this builder instance
-
ofTypeSpecifiedByAttribute
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
-
usingConstructor
Allows users to specify constructor argument type names.- Parameters:
paramTypeNames- the constructor argument type names- Returns:
- this builder instance
- Since:
- 3.2
-
usingConstructor
Allows users to specify constructor argument types.- Parameters:
constructorArgumentTypes- the constructor argument types- Returns:
- this builder instance
- Since:
- 3.2
-
usingDefaultConstructorArguments
Allows users to specify default constructor arguments.- Parameters:
defaultConstructorArguments- the default constructor arguments.- Returns:
- this builder instance
- Since:
- 3.2
-
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
-