You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2010/09/02 22:14:59 UTC
svn commit: r992100 -
/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java
Author: simonetripodi
Date: Thu Sep 2 20:14:58 2010
New Revision: 992100
URL: http://svn.apache.org/viewvc?rev=992100&view=rev
Log:
fixed checkstyle warning "Line is longer than 120 characters."
Modified:
commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java
Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java?rev=992100&r1=992099&r2=992100&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java (original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationsRuleSet.java Thu Sep 2 20:14:58 2010
@@ -73,7 +73,8 @@ public final class FromAnnotationsRuleSe
public void addRuleInstances(Digester digester) {
String pattern;
Rule rule;
- for (Entry<String, List<AnnotationRuleProvider<Annotation, AnnotatedElement, Rule>>> entry : this.rules.entrySet()) {
+ for (Entry<String, List<AnnotationRuleProvider<Annotation, AnnotatedElement, Rule>>> entry :
+ this.rules.entrySet()) {
pattern = entry.getKey();
for (AnnotationRuleProvider<Annotation, AnnotatedElement, Rule> provider : entry.getValue()) {
rule = provider.get();
@@ -105,10 +106,12 @@ public final class FromAnnotationsRuleSe
* @param annotation the current visited annotation.
* @param element the current visited element.
*/
- public <A extends Annotation, E extends AnnotatedElement, R extends Rule, T extends AnnotationRuleProvider<A, E, R>> void addRuleProvider(String pattern,
+ 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) {
+
T annotationRuleProvider =
this.digesterLoader.getAnnotationRuleProviderFactory().newInstance(klass);
annotationRuleProvider.init(annotation, element);
@@ -122,7 +125,8 @@ public final class FromAnnotationsRuleSe
* @param ruleProvider the provider that builds the digester rule.
*/
@SuppressWarnings("unchecked")
- public void addRuleProvider(String pattern, AnnotationRuleProvider<? extends Annotation, ? extends AnnotatedElement, ? extends Rule> ruleProvider) {
+ public void addRuleProvider(String pattern,
+ AnnotationRuleProvider<? extends Annotation, ? extends AnnotatedElement, ? extends Rule> ruleProvider) {
List<AnnotationRuleProvider<Annotation, AnnotatedElement, Rule>> rules;
if (this.rules.containsKey(pattern)) {
@@ -145,7 +149,9 @@ public final class FromAnnotationsRuleSe
* @return an {@link AnnotationRuleProvider} for the input pattern if found,
* null otherwise.
*/
- public <T extends AnnotationRuleProvider<? extends Annotation, ? extends AnnotatedElement, ? extends Rule>> T getProvider(String pattern, Class<T> providerClass) {
+ public <T extends AnnotationRuleProvider<? extends Annotation, ? extends AnnotatedElement, ? extends Rule>>
+ T getProvider(String pattern, Class<T> providerClass) {
+
if (!this.rules.containsKey(pattern)) {
return null;
}