commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r897477 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/
Date Sat, 09 Jan 2010 15:33:21 GMT
Author: simonetripodi
Date: Sat Jan  9 15:33:20 2010
New Revision: 897477

URL: http://svn.apache.org/viewvc?rev=897477&view=rev
Log:
defined the rule provider for each digester annotation

Modified:
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AttributeCallParam.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/BeanPropertySetter.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallMethod.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallParam.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FactoryCreate.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/ObjectCreate.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/PathCallParam.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetNext.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetProperty.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetRoot.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetTop.java
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/StackCallParam.java

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AttributeCallParam.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AttributeCallParam.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AttributeCallParam.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/AttributeCallParam.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.CallParamRule;
+import org.apache.commons.digester.annotations.providers.AttributeCallParamRuleProvider;
 
 /**
  * Methods arguments annotated with {@code AttributeCallParam} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.PARAMETER)
 @DigesterRule(
-        reflectsRule = CallParamRule.class
+        reflectsRule = CallParamRule.class,
+        providedBy = AttributeCallParamRuleProvider.class
 )
 public @interface AttributeCallParam {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/BeanPropertySetter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/BeanPropertySetter.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/BeanPropertySetter.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/BeanPropertySetter.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.BeanPropertySetterRule;
+import org.apache.commons.digester.annotations.providers.BeanPropertySetterRuleProvider;
 
 /**
  * Fields annotated with {@code BeanPropertySetter} will be bound with
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 @DigesterRule(
-        reflectsRule = BeanPropertySetterRule.class
+        reflectsRule = BeanPropertySetterRule.class,
+        providedBy = BeanPropertySetterRuleProvider.class
 )
 public @interface BeanPropertySetter {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallMethod.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallMethod.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallMethod.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallMethod.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.CallMethodRule;
+import org.apache.commons.digester.annotations.providers.CallMethodRuleProvider;
 
 /**
  * Methods annotated with {@code CallMethod} will be bound with
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 @DigesterRule(
-        reflectsRule = CallMethodRule.class
+        reflectsRule = CallMethodRule.class,
+        providedBy = CallMethodRuleProvider.class
 )
 public @interface CallMethod {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallParam.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallParam.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallParam.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/CallParam.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.CallParamRule;
+import org.apache.commons.digester.annotations.providers.CallParamRuleProvider;
 
 /**
  * Methods arguments annotated with {@code CallParam} will be bound with
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.PARAMETER)
 @DigesterRule(
-        reflectsRule = CallParamRule.class
+        reflectsRule = CallParamRule.class,
+        providedBy = CallParamRuleProvider.class
 )
 public @interface CallParam {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterRule.java
Sat Jan  9 15:33:20 2010
@@ -16,11 +16,13 @@
  */
 package org.apache.commons.digester.annotations;
 
+import java.lang.annotation.Annotation;
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
+import java.lang.reflect.AnnotatedElement;
 
 import org.apache.commons.digester.Rule;
 
@@ -42,4 +44,12 @@
      */
     Class<? extends Rule> reflectsRule();
 
+    /**
+     * Define the {@link AnnotationRuleProvider} that builds the {@link Rule}
+     * related to the digester rule.
+     *
+     * @return the {@link AnnotationRuleProvider}.
+     */
+    Class<? extends AnnotationRuleProvider<? extends Annotation, ? extends AnnotatedElement,
? extends Rule>> providedBy();
+
 }

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FactoryCreate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FactoryCreate.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FactoryCreate.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/FactoryCreate.java
Sat Jan  9 15:33:20 2010
@@ -24,6 +24,7 @@
 
 import org.apache.commons.digester.AbstractObjectCreationFactory;
 import org.apache.commons.digester.FactoryCreateRule;
+import org.apache.commons.digester.annotations.providers.FactoryCreateRuleProvider;
 
 /**
  * Classes annotated with {@code FactoryCreate} will be bound with
@@ -38,7 +39,8 @@
 @Target(ElementType.TYPE)
 @CreationRule
 @DigesterRule(
-        reflectsRule = FactoryCreateRule.class
+        reflectsRule = FactoryCreateRule.class,
+        providedBy = FactoryCreateRuleProvider.class
 )
 public @interface FactoryCreate {
 
@@ -72,9 +74,7 @@
     @Documented
     @Retention(RetentionPolicy.RUNTIME)
     @Target(ElementType.TYPE)
-    @DigesterRule(
-            reflectsRule = FactoryCreateRule.class
-    )
+    @DigesterRuleList
     @interface List {
         FactoryCreate[] value();
     }

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/ObjectCreate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/ObjectCreate.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/ObjectCreate.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/ObjectCreate.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.ObjectCreateRule;
+import org.apache.commons.digester.annotations.providers.ObjectCreateRuleProvider;
 
 /**
  * Classes annotated with {@code ObjectCreate} will be bound with
@@ -37,7 +38,8 @@
 @Target(ElementType.TYPE)
 @CreationRule
 @DigesterRule(
-        reflectsRule = ObjectCreateRule.class
+        reflectsRule = ObjectCreateRule.class,
+        providedBy = ObjectCreateRuleProvider.class
 )
 public @interface ObjectCreate {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/PathCallParam.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/PathCallParam.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/PathCallParam.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/PathCallParam.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.PathCallParamRule;
+import org.apache.commons.digester.annotations.providers.PathCallParamRuleProvider;
 
 /**
  * Methods arguments annotated with {@code PathCallParam} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.PARAMETER)
 @DigesterRule(
-        reflectsRule = PathCallParamRule.class
+        reflectsRule = PathCallParamRule.class,
+        providedBy = PathCallParamRuleProvider.class
 )
 public @interface PathCallParam {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetNext.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetNext.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetNext.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetNext.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.SetNextRule;
+import org.apache.commons.digester.annotations.providers.SetNextRuleProvider;
 
 /**
  * Methods annotated with {@code SetNext} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 @DigesterRule(
-        reflectsRule = SetNextRule.class
+        reflectsRule = SetNextRule.class,
+        providedBy = SetNextRuleProvider.class
 )
 public @interface SetNext {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetProperty.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetProperty.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetProperty.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetProperty.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.SetPropertiesRule;
+import org.apache.commons.digester.annotations.providers.SetPropertiesRuleProvider;
 
 /**
  * Fields annotated with {@code SetProperty} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 @DigesterRule(
-        reflectsRule = SetPropertiesRule.class
+        reflectsRule = SetPropertiesRule.class,
+        providedBy = SetPropertiesRuleProvider.class
 )
 public @interface SetProperty {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetRoot.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetRoot.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetRoot.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetRoot.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.SetRootRule;
+import org.apache.commons.digester.annotations.providers.SetRootRuleProvider;
 
 /**
  * Methods annotated with {@code SetRoot} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 @DigesterRule(
-        reflectsRule = SetRootRule.class
+        reflectsRule = SetRootRule.class,
+        providedBy = SetRootRuleProvider.class
 )
 public @interface SetRoot {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetTop.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetTop.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetTop.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/SetTop.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.SetTopRule;
+import org.apache.commons.digester.annotations.providers.SetTopRuleProvider;
 
 /**
  * Methods annotated with {@code SetTop} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 @DigesterRule(
-        reflectsRule = SetTopRule.class
+        reflectsRule = SetTopRule.class,
+        providedBy = SetTopRuleProvider.class
 )
 public @interface SetTop {
 

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/StackCallParam.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/StackCallParam.java?rev=897477&r1=897476&r2=897477&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/StackCallParam.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/StackCallParam.java
Sat Jan  9 15:33:20 2010
@@ -23,6 +23,7 @@
 import java.lang.annotation.Target;
 
 import org.apache.commons.digester.CallParamRule;
+import org.apache.commons.digester.annotations.providers.StackCallParamRuleProvider;
 
 /**
  * Methods arguments annotated with {@code StackCallParam} will be bound
@@ -36,7 +37,8 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.PARAMETER)
 @DigesterRule(
-        reflectsRule = CallParamRule.class
+        reflectsRule = CallParamRule.class,
+        providedBy = StackCallParamRuleProvider.class
 )
 public @interface StackCallParam {
 



Mime
View raw message