private static class ConfigurationFactory.CallOptionalMethodRule
extends org.apache.commons.digester.CallMethodRule
CallMethodRule
that
is internally used for calling a file configuration's load()
method. This class difers from its ancestor that it catches all occuring
exceptions when the specified method is called. It then checks whether
for the corresponding configuration the optional attribute is set. If
this is the case, the exception will simply be ignored.Modifier and Type | Field and Description |
---|---|
private boolean |
optional
A flag whether the optional attribute is set for this node.
|
Constructor and Description |
---|
ConfigurationFactory.CallOptionalMethodRule(java.lang.String methodName)
Creates a new instance of
CallOptionalMethodRule and
sets the name of the method to invoke. |
Modifier and Type | Method and Description |
---|---|
void |
begin(org.xml.sax.Attributes attrs)
Checks if the optional attribute is set.
|
void |
end()
Calls the method.
|
body, finish, getUseExactMatch, processMethodCallResult, setDigester, setUseExactMatch, toString
private boolean optional
public ConfigurationFactory.CallOptionalMethodRule(java.lang.String methodName)
CallOptionalMethodRule
and
sets the name of the method to invoke.methodName
- the name of the methodpublic void begin(org.xml.sax.Attributes attrs) throws java.lang.Exception
begin
in class org.apache.commons.digester.CallMethodRule
attrs
- the attributesjava.lang.Exception
- if an error occurspublic void end() throws java.lang.Exception
end
in class org.apache.commons.digester.CallMethodRule
java.lang.Exception
- if an error occurs