wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r1000079 - /incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java
Date Wed, 22 Sep 2010 16:45:49 GMT
Author: bluk
Date: Wed Sep 22 16:45:49 2010
New Revision: 1000079

URL: http://svn.apache.org/viewvc?rev=1000079&view=rev
Log:
InjectableFactory receives all the attributes

Allow wink-common's injectables to keep some
of the attributes in the metadata.

Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java?rev=1000079&r1=1000078&r2=1000079&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java
(original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/registry/InjectableFactory.java
Wed Sep 22 16:45:49 2010
@@ -117,7 +117,8 @@ public class InjectableFactory {
         }
 
         if (annotationsCounter > 1) {
-            throw new IllegalStateException(Messages.getMessage("conflictingParameterAnnotations",
member.getName())); //$NON-NLS-1$
+            throw new IllegalStateException(Messages
+                .getMessage("conflictingParameterAnnotations", member.getName())); //$NON-NLS-1$
         }
 
         if (matrix != null) {
@@ -153,8 +154,12 @@ public class InjectableFactory {
 
     private static class NullInjectable extends Injectable {
 
-        protected NullInjectable(ParamType paramType) {
-            super(paramType, null, null, null, null);
+        protected NullInjectable(ParamType paramType,
+                                 Class<?> type,
+                                 Type genericType,
+                                 Annotation[] annotations,
+                                 Member member) {
+            super(paramType, type, genericType, annotations, member);
         }
 
         @Override
@@ -193,7 +198,8 @@ public class InjectableFactory {
                                         Type genericType,
                                         Annotation[] annotations,
                                         Member member) {
-        return new NullInjectable(Injectable.ParamType.MATRIX);
+        return new NullInjectable(Injectable.ParamType.MATRIX, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createPathParam(String value,
@@ -201,7 +207,8 @@ public class InjectableFactory {
                                       Type genericType,
                                       Annotation[] annotations,
                                       Member member) {
-        return new NullInjectable(Injectable.ParamType.PATH);
+        return new NullInjectable(Injectable.ParamType.PATH, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createQueryParam(String value,
@@ -209,7 +216,8 @@ public class InjectableFactory {
                                        Type genericType,
                                        Annotation[] annotations,
                                        Member member) {
-        return new NullInjectable(Injectable.ParamType.QUERY);
+        return new NullInjectable(Injectable.ParamType.QUERY, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createHeaderParam(String value,
@@ -217,7 +225,8 @@ public class InjectableFactory {
                                         Type genericType,
                                         Annotation[] annotations,
                                         Member member) {
-        return new NullInjectable(Injectable.ParamType.HEADER);
+        return new NullInjectable(Injectable.ParamType.HEADER, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createCookieParam(String value,
@@ -225,7 +234,8 @@ public class InjectableFactory {
                                         Type genericType,
                                         Annotation[] annotations,
                                         Member member) {
-        return new NullInjectable(Injectable.ParamType.COOKIE);
+        return new NullInjectable(Injectable.ParamType.COOKIE, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createFormParam(String value,
@@ -233,14 +243,16 @@ public class InjectableFactory {
                                       Type genericType,
                                       Annotation[] annotations,
                                       Member member) {
-        return new NullInjectable(Injectable.ParamType.FORM);
+        return new NullInjectable(Injectable.ParamType.FORM, classType, genericType, annotations,
+                                  member);
     }
 
     public Injectable createEntityParam(Class<?> classType,
                                         Type genericType,
                                         Annotation[] annotations,
                                         Member member) {
-        return new NullInjectable(Injectable.ParamType.ENTITY);
+        return new NullInjectable(Injectable.ParamType.ENTITY, classType, genericType, annotations,
+                                  member);
     }
 
 }



Mime
View raw message