Package | Description |
---|---|
org.apache.commons.digester |
The
xmlrules package provides for XML-based definition of
rules for Digester . |
org.apache.commons.digester.annotations |
The
annotations package provides for Java5 Annotations
meta data-based definition of rules for Digester . |
org.apache.commons.digester.annotations.handlers |
The
handlers package contains
DigesterLoaderHandler
implementations. |
org.apache.commons.digester.annotations.internal |
This package contains internal use only classes, users can ignore it.
|
org.apache.commons.digester.annotations.spi |
Contains annotations package SPI definition.
|
org.apache.commons.digester.plugins |
The
plugins package provides an easy mechanism whereby new
digestion rules can be added dynamically during a digestion. |
org.apache.commons.digester.xmlrules |
The Digester package lets you configure an XML -> Java object mapping module,
which triggers certain actions called rules whenever a particular pattern of
nested XML elements is recognized.
|
Modifier and Type | Class and Description |
---|---|
class |
BeanPropertySetterRule
Rule implements sets a bean property on the top object
to the body text.
|
class |
CallMethodRule
Rule implementation that calls a method on an object on the stack
(normally the top/parent object), passing arguments collected from
subsequent
CallParamRule rules or from the body of this
element. |
class |
CallParamRule
Rule implementation that saves a parameter for use by a surrounding
CallMethodRule |
class |
FactoryCreateRule
Rule implementation that uses an
ObjectCreationFactory to create
a new object which it pushes onto the object stack. |
class |
NodeCreateRule
A rule implementation that creates a DOM
Node containing the XML at the element that matched
the rule. |
class |
ObjectCreateRule
Rule implementation that creates a new object and pushes it
onto the object stack.
|
class |
ObjectParamRule
Rule implementation that saves a parameter for use by a surrounding
CallMethodRule |
class |
PathCallParamRule
Rule implementation that saves a parameter containing the
Digester matching path for use by a surrounding
CallMethodRule . |
class |
SetNestedPropertiesRule
Rule implementation that sets properties on the object at the top of the
stack, based on child elements with names matching properties on that
object.
|
private class |
SetNestedPropertiesRule.AnyChildRule |
class |
SetNextRule
Rule implementation that calls a method on the (top-1) (parent)
object, passing the top object (child) as an argument.
|
class |
SetPropertiesRule
Rule implementation that sets properties on the object at the top of the
stack, based on attributes with corresponding names.
|
class |
SetPropertyRule
Rule implementation that sets an individual property on the object at the
top of the stack, based on attributes with specified names.
|
class |
SetRootRule
Rule implementation that calls a method on the root object on the stack,
passing the top object (child) as an argument.
|
class |
SetTopRule
Rule implementation that calls a "set parent" method on the top (child)
object, passing the (top-1) (parent) object as an argument.
|
Modifier and Type | Field and Description |
---|---|
(package private) Rule |
RegexRules.RegisteredRule.rule |
Modifier and Type | Field and Description |
---|---|
private java.util.List<Rule> |
WithDefaultsRulesWrapper.allRules
All rules (preserves order in which they were originally added)
|
protected java.util.HashMap<java.lang.String,java.util.List<Rule>> |
RulesBase.cache
The set of registered Rule instances, keyed by the matching pattern.
|
private java.util.List<Rule> |
WithDefaultsRulesWrapper.defaultRules
Rules to be fired when the wrapped implementations returns none.
|
protected java.util.Stack<java.util.List<Rule>> |
Digester.matches
Stack whose elements are List objects, each containing a list of
Rule objects as returned from Rules.getMatch().
|
private java.util.Map<Rule,java.lang.Integer> |
ExtendedBaseRules.order
The decision algorithm used (unfortunately) doesn't preserve the entry
order.
|
private java.util.ArrayList<Rule> |
SetNestedPropertiesRule.AnyChildRules.rules |
protected java.util.ArrayList<Rule> |
RulesBase.rules
The set of registered Rule instances, in the order that they were
originally registered.
|
Modifier and Type | Method and Description |
---|---|
private java.util.List<Rule> |
ExtendedBaseRules.findExactAncesterMatch(java.lang.String parentPattern)
Finds an exact ancester match for given pattern
|
java.util.List<Rule> |
WithDefaultsRulesWrapper.getDefaults()
Gets Rule's which will be fired when the wrapped implementation returns no matches
|
(package private) java.util.List<Rule> |
Digester.getRules(java.lang.String match)
Deprecated.
Call
match() on the Rules
implementation returned by getRules() |
protected java.util.List<Rule> |
RulesBase.lookup(java.lang.String namespaceURI,
java.lang.String pattern)
Return a List of Rule instances for the specified pattern that also
match the specified namespace URI (if any).
|
java.util.List<Rule> |
WithDefaultsRulesWrapper.match(java.lang.String pattern) |
java.util.List<Rule> |
AbstractRulesImpl.match(java.lang.String pattern)
Deprecated.
Call match(namespaceURI,pattern) instead.
|
java.util.List<Rule> |
SetNestedPropertiesRule.AnyChildRules.match(java.lang.String matchPath) |
java.util.List<Rule> |
Rules.match(java.lang.String pattern)
Deprecated.
Call match(namespaceURI,pattern) instead.
|
java.util.List<Rule> |
RulesBase.match(java.lang.String pattern)
Deprecated.
Call match(namespaceURI,pattern) instead.
|
java.util.List<Rule> |
WithDefaultsRulesWrapper.match(java.lang.String namespaceURI,
java.lang.String pattern)
Return list of rules matching given pattern.
|
java.util.List<Rule> |
RegexRules.match(java.lang.String namespaceURI,
java.lang.String pattern)
Finds matching rules by using current regex matching strategy.
|
abstract java.util.List<Rule> |
AbstractRulesImpl.match(java.lang.String namespaceURI,
java.lang.String pattern)
Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches.
|
java.util.List<Rule> |
ExtendedBaseRules.match(java.lang.String namespace,
java.lang.String pattern)
Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches.
|
java.util.List<Rule> |
SetNestedPropertiesRule.AnyChildRules.match(java.lang.String namespaceURI,
java.lang.String matchPath) |
java.util.List<Rule> |
Rules.match(java.lang.String namespaceURI,
java.lang.String pattern)
Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches.
|
java.util.List<Rule> |
RulesBase.match(java.lang.String namespaceURI,
java.lang.String pattern)
Return a List of all registered Rule instances that match the specified
nesting pattern, or a zero-length List if there are no matches.
|
java.util.List<Rule> |
WithDefaultsRulesWrapper.rules()
Gets all rules
|
java.util.List<Rule> |
RegexRules.rules()
Return a List of all registered Rule instances, or a zero-length List
if there are no registered Rule instances.
|
abstract java.util.List<Rule> |
AbstractRulesImpl.rules()
Return a List of all registered Rule instances, or a zero-length List
if there are no registered Rule instances.
|
java.util.List<Rule> |
SetNestedPropertiesRule.AnyChildRules.rules() |
java.util.List<Rule> |
Rules.rules()
Return a List of all registered Rule instances, or a zero-length List
if there are no registered Rule instances.
|
java.util.List<Rule> |
RulesBase.rules()
Return a List of all registered Rule instances, or a zero-length List
if there are no registered Rule instances.
|
Modifier and Type | Method and Description |
---|---|
void |
WithDefaultsRulesWrapper.add(java.lang.String pattern,
Rule rule)
Adds a Rule to be fired on given pattern.
|
void |
AbstractRulesImpl.add(java.lang.String pattern,
Rule rule)
Registers a new Rule instance matching the specified pattern.
|
void |
ExtendedBaseRules.add(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching the specified pattern.
|
void |
SetNestedPropertiesRule.AnyChildRules.add(java.lang.String pattern,
Rule rule) |
void |
Rules.add(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching the specified pattern.
|
void |
RulesBase.add(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching the specified pattern.
|
void |
WithDefaultsRulesWrapper.addDefault(Rule rule)
Adds a rule to be fired when wrapped implementation returns no matches
|
void |
Digester.addRule(java.lang.String pattern,
Rule rule)
Register a new Rule matching the specified pattern.
|
protected void |
RegexRules.registerRule(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching the specified pattern.
|
protected abstract void |
AbstractRulesImpl.registerRule(java.lang.String pattern,
Rule rule)
Register rule at given pattern.
|
Constructor and Description |
---|
RegisteredRule(java.lang.String pattern,
Rule rule) |
Modifier and Type | Interface and Description |
---|---|
interface |
AnnotationRuleProvider<A extends java.lang.annotation.Annotation,E extends java.lang.reflect.AnnotatedElement,R extends Rule>
An object capable of providing instances of
Rule . |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.List<AnnotationRuleProvider<java.lang.annotation.Annotation,java.lang.reflect.AnnotatedElement,Rule>>> |
FromAnnotationsRuleSet.rules
The data structure that stores the patterns/
AnnotationRuleProvider
pairs. |
Modifier and Type | Method and Description |
---|---|
<A extends java.lang.annotation.Annotation,E extends java.lang.reflect.AnnotatedElement,R extends Rule,T extends AnnotationRuleProvider<A,E,R>> |
FromAnnotationsRuleSet.addRuleProvider(java.lang.String pattern,
java.lang.Class<T> klass,
A annotation,
E element)
Builds and register an
AnnotationRuleProvider for a specific
pattern. |
<T extends AnnotationRuleProvider<? extends java.lang.annotation.Annotation,? extends java.lang.reflect.AnnotatedElement,? extends Rule>> |
FromAnnotationsRuleSet.getProvider(java.lang.String pattern,
java.lang.Class<T> providerClass)
Retrieves a specific instance of the
AnnotationRuleProvider for
the input pattern. |
private <A extends java.lang.annotation.Annotation,E extends java.lang.reflect.AnnotatedElement,R extends Rule> |
DigesterLoader.handle(A annotation,
E element,
FromAnnotationsRuleSet ruleSet)
Handles the current visited element and related annotation, invoking the
right handler putting the rule provider in the rule set.
|
Modifier and Type | Method and Description |
---|---|
private java.util.Map<java.lang.String,java.util.List<AnnotationRuleProvider<java.lang.annotation.Annotation,java.lang.reflect.AnnotatedElement,Rule>>> |
FromAnnotationsRuleSet.getRules()
Returns the data structure the patterns/
AnnotationRuleProvider
pairs. |
Modifier and Type | Method and Description |
---|---|
void |
FromAnnotationsRuleSet.addRuleProvider(java.lang.String pattern,
AnnotationRuleProvider<? extends java.lang.annotation.Annotation,? extends java.lang.reflect.AnnotatedElement,? extends Rule> ruleProvider)
Register an
AnnotationRuleProvider for a specific pattern. |
Modifier and Type | Method and Description |
---|---|
private <A extends java.lang.annotation.Annotation,R extends Rule> |
MethodHandler.doHandle(A methodAnnotation,
java.lang.annotation.Annotation annotation,
java.lang.reflect.Method method,
java.lang.Class<?> type,
FromAnnotationsRuleSet ruleSet) |
Modifier and Type | Method and Description |
---|---|
<T extends AnnotationRuleProvider<? extends java.lang.annotation.Annotation,? extends java.lang.reflect.AnnotatedElement,? extends Rule>> |
DefaultAnnotationRuleProviderFactory.newInstance(java.lang.Class<T> type)
Return an
AnnotationRuleProvider instance of the specified type. |
Modifier and Type | Method and Description |
---|---|
<T extends AnnotationRuleProvider<? extends java.lang.annotation.Annotation,? extends java.lang.reflect.AnnotatedElement,? extends Rule>> |
AnnotationRuleProviderFactory.newInstance(java.lang.Class<T> type)
Return an
AnnotationRuleProvider instance of the specified type. |
Modifier and Type | Class and Description |
---|---|
class |
PluginCreateRule
Allows the original rules for parsing the configuration file to define
points at which plugins are allowed, by configuring a PluginCreateRule
with the appropriate pattern.
|
class |
PluginDeclarationRule
A Digester rule which allows the user to pre-declare a class which is to
be referenced later at a plugin point by a PluginCreateRule.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Rule> |
PluginRules.match(java.lang.String path)
Deprecated.
Call match(namespaceURI,pattern) instead.
|
java.util.List<Rule> |
PluginRules.match(java.lang.String namespaceURI,
java.lang.String path)
Return a List of all registered Rule instances that match the specified
nodepath, or a zero-length List if there are no matches.
|
java.util.List<Rule> |
PluginRules.rules()
Return the list of rules registered with this object, in the order
they were registered with this object.
|
Modifier and Type | Method and Description |
---|---|
void |
PluginRules.add(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching the specified pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
PluginCreateRule.fireBeginMethods(java.util.List<Rule> rules,
java.lang.String namespace,
java.lang.String name,
org.xml.sax.Attributes list)
Duplicate the processing that the Digester does when firing the
begin methods of rules.
|
private void |
PluginCreateRule.fireBodyMethods(java.util.List<Rule> rules,
java.lang.String namespaceURI,
java.lang.String name,
java.lang.String text)
Duplicate the processing that the Digester does when firing the
body methods of rules.
|
void |
PluginCreateRule.fireEndMethods(java.util.List<Rule> rules,
java.lang.String namespaceURI,
java.lang.String name)
Duplicate the processing that the Digester does when firing the
end methods of rules.
|
Modifier and Type | Class and Description |
---|---|
private class |
DigesterRuleParser.IncludeRule
A rule for including one rules XML file within another.
|
private class |
DigesterRuleParser.PatternRule
A rule for extracting the pattern matching strings from the rules XML.
|
protected class |
DigesterRuleParser.SetNestedPropertiesAliasRule
A rule for adding a attribute-property alias to the custom alias mappings of
the containing SetNestedPropertiesRule rule.
|
protected class |
DigesterRuleParser.SetPropertiesAliasRule
A rule for adding a attribute-property alias to the custom alias mappings of
the containing SetPropertiesRule rule.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Rule> |
DigesterRuleParser.RulesPrefixAdapter.match(java.lang.String pattern)
Deprecated.
Call match(namespaceURI,pattern) instead.
|
java.util.List<Rule> |
DigesterRuleParser.RulesPrefixAdapter.match(java.lang.String namespaceURI,
java.lang.String pattern)
This method passes through to the underlying Rules object.
|
java.util.List<Rule> |
DigesterRuleParser.RulesPrefixAdapter.rules()
This method passes through to the underlying Rules object.
|
Modifier and Type | Method and Description |
---|---|
void |
DigesterRuleParser.add(Rule rule)
Adds a rule the the target digester.
|
void |
DigesterRuleParser.RulesPrefixAdapter.add(java.lang.String pattern,
Rule rule)
Register a new Rule instance matching a pattern which is constructed
by concatenating the pattern prefix with the given pattern.
|