com.samskivert.xml
Class ValidatedSetNextRule
java.lang.Object
org.apache.commons.digester.Rule
com.samskivert.xml.ValidatedSetNextRule
public class ValidatedSetNextRule
- extends org.apache.commons.digester.Rule
Like the SetNextRule except that the object on the top of
the stack is validated before the set next method is called. If the
object is determined not to be valid, the set next method will not be
called (and the assumption is that the validator will have emitted some
useful error message indicating to the user why the object was
invalid).
|
Nested Class Summary |
static interface |
ValidatedSetNextRule.Validator
An implementor if this interface will be used to determine whether
the object on the top of the stack is valid before it is "set
next"ed. |
| Fields inherited from class org.apache.commons.digester.Rule |
digester, namespaceURI |
| Methods inherited from class org.apache.commons.digester.Rule |
begin, begin, body, body, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI |
_methodName
protected String _methodName
_paramType
protected Class<?> _paramType
_validator
protected ValidatedSetNextRule.Validator _validator
ValidatedSetNextRule
public ValidatedSetNextRule(String methodName,
ValidatedSetNextRule.Validator validator)
- Constructs a set method rule for the specified method.
ValidatedSetNextRule
public ValidatedSetNextRule(String methodName,
Class<?> paramType,
ValidatedSetNextRule.Validator validator)
- Constructs a set method rule for the specified method with the
specified parameter type.
end
public void end(String namespace,
String name)
throws Exception
- Overrides:
end in class org.apache.commons.digester.Rule
- Throws:
Exception
toString
public String toString()
- Render a printable version of this rule.
- Overrides:
toString in class Object
Copyright © 2000-2008 Michael Bayne.
All Rights Reserved.