Package org.apache.commons.digester
Class SetPropertyRule
java.lang.Object
org.apache.commons.digester.Rule
org.apache.commons.digester.SetPropertyRule
Rule implementation that sets an individual property on the object at the
top of the stack, based on attributes with specified names.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The attribute that will contain the property name.protected String
The attribute that will contain the property value.Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
-
Constructor Summary
ConstructorsConstructorDescriptionSetPropertyRule
(String name, String value) Construct a "set property" rule with the specified name and value attributes.SetPropertyRule
(Digester digester, String name, String value) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin
(Attributes attributes) Process the beginning of this element.toString()
Render a printable version of this Rule.Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
-
Field Details
-
name
The attribute that will contain the property name. -
value
The attribute that will contain the property value.
-
-
Constructor Details
-
SetPropertyRule
Deprecated.The digester instance is now set in theDigester.addRule(java.lang.String, org.apache.commons.digester.Rule)
method. UseSetPropertyRule(String name, String value)
instead.Construct a "set property" rule with the specified name and value attributes.- Parameters:
digester
- The digester with which this rule is associatedname
- Name of the attribute that will contain the name of the property to be setvalue
- Name of the attribute that will contain the value to which the property should be set
-
SetPropertyRule
Construct a "set property" rule with the specified name and value attributes.- Parameters:
name
- Name of the attribute that will contain the name of the property to be setvalue
- Name of the attribute that will contain the value to which the property should be set
-
-
Method Details
-
begin
Process the beginning of this element.- Overrides:
begin
in classRule
- Parameters:
attributes
- The attribute list of this element- Throws:
NoSuchMethodException
- if the bean does not have a writeable property of the specified nameException
-
toString
Render a printable version of this Rule.
-
Digester.addRule(java.lang.String, org.apache.commons.digester.Rule)
method.