Modifier | Constructor and Description |
---|---|
protected |
FromAnnotationsRuleSet(DigesterLoader digesterLoader)
Created a new
FromAnnotationsRuleSet instance. |
Modifier and Type | Method and Description |
---|---|
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. |
<A extends Annotation,E extends AnnotatedElement,R extends Rule,T extends AnnotationRuleProvider<A,E,R>> |
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
AnnotationRuleProvider s to
this FromAnnotationsRuleSet . |
void |
addRulesProviderFrom(FromAnnotationsRuleSet ruleSet)
Add created
AnnotationRuleProvider s created in another analysis
session. |
String |
getNamespaceURI()
Return the namespace URI that will be applied to all Rule instances
created from this RuleSet.
|
<T extends AnnotationRuleProvider<? extends Annotation,? extends AnnotatedElement,? extends Rule>> |
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() |
protected FromAnnotationsRuleSet(DigesterLoader digesterLoader)
FromAnnotationsRuleSet
instance.digesterLoader
- the parent DigesterLoader.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 RuleSet
digester
- Digester instance to which the new Rule instances
should be added.public void addRules(Class<?> target)
AnnotationRuleProvider
s 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
classAnnotationRuleProvider
for the input pattern if found,
null otherwise.public void addRulesProviderFrom(FromAnnotationsRuleSet ruleSet)
AnnotationRuleProvider
s 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 RuleSet
public void setNamespaceURI(String namespaceURI)
namespaceURI
- the namespace URI that will be applied to all Rule
instances created from this RuleSet.Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.