bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r996992 - /incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java
Date Tue, 14 Sep 2010 17:05:40 GMT
Author: mbenson
Date: Tue Sep 14 17:05:40 2010
New Revision: 996992

URL: http://svn.apache.org/viewvc?rev=996992&view=rev
Log:
add a convenience method for better clarity when processing a single class-level annotation

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java?rev=996992&r1=996991&r2=996992&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303/src/main/java/org/apache/bval/jsr303/AnnotationProcessor.java
Tue Sep 14 17:05:40 2010
@@ -95,6 +95,26 @@ public final class AnnotationProcessor {
     }
 
     /**
+     * Convenience method to process a single class-level annotation.
+     * 
+     * @param <A>
+     *            annotation type
+     * @param annotation
+     *            to process
+     * @param owner
+     *            bean type
+     * @param appender
+     *            handling accumulation
+     * @return whether any processing took place
+     * @throws IllegalAccessException
+     * @throws InvocationTargetException
+     */
+    public final <A extends Annotation> boolean processAnnotation(A annotation, Class<?>
owner, AppendValidation appender)
+        throws IllegalAccessException, InvocationTargetException {
+        return processAnnotation(annotation, null, owner, null, appender);
+    }
+
+    /**
      * Process a single annotation.
      * 
      * @param <A>



Mime
View raw message