|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.digester.annotations.FromAnnotationsRuleSet
public final class FromAnnotationsRuleSet
A RuleSet implementation that's able to inject Rules created
with the annotations analysis.
| Constructor Summary | |
|---|---|
protected |
FromAnnotationsRuleSet(DigesterLoader digesterLoader)
Created a new FromAnnotationsRuleSet instance. |
| Method Summary | ||
|---|---|---|
protected void |
addMappedClass(Class<?> clazz)
Remember that this RuleSet is able to build Digester mapping rules for the input type. |
|
void |
addRuleInstances(Digester digester)
Add the set of Rule instances defined in this RuleSet to the specified Digester instance, associating them with
our namespace URI (if any). |
|
void |
addRuleProvider(String pattern,
AnnotationRuleProvider<? extends Annotation,? extends AnnotatedElement,? extends Rule> ruleProvider)
Register an AnnotationRuleProvider for a specific pattern. |
|
|
addRuleProvider(String pattern,
Class<T> klass,
A annotation,
E element)
Builds and register an AnnotationRuleProvider for a specific
pattern. |
|
void |
addRules(Class<?> target)
Analyzes the target class and adds the AnnotationRuleProviders to
this FromAnnotationsRuleSet. |
|
void |
addRulesProviderFrom(FromAnnotationsRuleSet ruleSet)
Add created AnnotationRuleProviders created in another analysis
session. |
|
String |
getNamespaceURI()
Return the namespace URI that will be applied to all Rule instances created from this RuleSet. |
|
|
getProvider(String pattern,
Class<T> providerClass)
Retrieves a specific instance of the AnnotationRuleProvider for
the input pattern. |
|
protected boolean |
mapsClass(Class<?> clazz)
Checks if this RuleSet builds Digester mapping rules for the input type. |
|
void |
setNamespaceURI(String namespaceURI)
Sets the namespace URI that will be applied to all Rule instances created from this RuleSet. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected FromAnnotationsRuleSet(DigesterLoader digesterLoader)
FromAnnotationsRuleSet instance.
digesterLoader - the parent DigesterLoader.| Method Detail |
|---|
public void addRuleInstances(Digester digester)
Digester instance, associating them with
our namespace URI (if any). This method should only be called
by a Digester instance.
addRuleInstances in interface RuleSetdigester - Digester instance to which the new Rule instances
should be added.public void addRules(Class<?> target)
AnnotationRuleProviders to
this FromAnnotationsRuleSet.
target - the class has to be analyzed.
public <A extends Annotation,E extends AnnotatedElement,R extends Rule,T extends AnnotationRuleProvider<A,E,R>> void addRuleProvider(String pattern,
Class<T> klass,
A annotation,
E element)
AnnotationRuleProvider for a specific
pattern.
T - the AnnotationRuleProvider type.pattern - the pattern has to be associated to the rule provider.klass - the AnnotationRuleProvider type has to be instantiated.annotation - the current visited annotation.element - the current visited element.
public void addRuleProvider(String pattern,
AnnotationRuleProvider<? extends Annotation,? extends AnnotatedElement,? extends Rule> ruleProvider)
AnnotationRuleProvider for a specific pattern.
pattern - the pattern has to be associated to the rule provider.ruleProvider - the provider that builds the digester rule.
public <T extends AnnotationRuleProvider<? extends Annotation,? extends AnnotatedElement,? extends Rule>> T getProvider(String pattern,
Class<T> providerClass)
AnnotationRuleProvider for
the input pattern.
T - the AnnotationRuleProvider typepattern - the input patternproviderClass - the AnnotationRuleProvider class
AnnotationRuleProvider for the input pattern if found,
null otherwise.public void addRulesProviderFrom(FromAnnotationsRuleSet ruleSet)
AnnotationRuleProviders created in another analysis
session.
ruleSet - the RuleSet created in another analysis session.protected boolean mapsClass(Class<?> clazz)
clazz - the input type.
protected void addMappedClass(Class<?> clazz)
clazz - the input type.public String getNamespaceURI()
getNamespaceURI in interface RuleSetpublic void setNamespaceURI(String namespaceURI)
namespaceURI - the namespace URI that will be applied to all Rule
instances created from this RuleSet.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||