You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2010/09/16 17:57:30 UTC

svn commit: r997807 - /commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java

Author: mbenson
Date: Thu Sep 16 15:57:30 2010
New Revision: 997807

URL: http://svn.apache.org/viewvc?rev=997807&view=rev
Log:
factory method

Modified:
    commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java

Modified: commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java?rev=997807&r1=997806&r2=997807&view=diff
==============================================================================
--- commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java (original)
+++ commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java Thu Sep 16 15:57:30 2010
@@ -53,4 +53,14 @@ public class AnnotationStubConfigurer<T 
      */
     protected void configureAnnotation(T stub) {
     }
+
+    /**
+     * Factory method.
+     * @param <T>
+     * @param type
+     * @return {@link AnnotationStubConfigurer} for type
+     */
+    public static <T extends Annotation> AnnotationStubConfigurer<T> forType(Class<T> type) {
+        return new AnnotationStubConfigurer<T>(type);
+    }
 }