commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r997807 - /commons/proper/proxy/branches/version-2.0-work/stub/src/main/java/org/apache/commons/proxy2/stub/AnnotationStubConfigurer.java
Date Thu, 16 Sep 2010 15:57:30 GMT
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);
+    }
 }



Mime
View raw message