Author: swd847
Date: 2010-04-12 02:45:49 -0400 (Mon, 12 Apr 2010)
New Revision: 6090
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/AbstractNewAnnotatedCallable.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedConstructor.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedMethod.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedParameter.java
Log:
updated NewAnnotatedParameter to properly deal with generic types
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/AbstractNewAnnotatedCallable.java
===================================================================
---
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/AbstractNewAnnotatedCallable.java 2010-04-11
12:20:16 UTC (rev 6089)
+++
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/AbstractNewAnnotatedCallable.java 2010-04-12
06:45:49 UTC (rev 6090)
@@ -21,10 +21,10 @@
private final List<AnnotatedParameter<X>> parameters;
- protected AbstractNewAnnotatedCallable(AnnotatedType<X> declaringType, Y member,
Class<?> memberType, Class<?>[] parameterTypes, AnnotationStore annotations,
Map<Integer, AnnotationStore> parameterAnnotations, Type genericType,
Map<Integer, Type> parameterTypeOverrides)
+ protected AbstractNewAnnotatedCallable(AnnotatedType<X> declaringType, Y member,
Class<?> memberType, Class<?>[] parameterTypes, Type[] genericTypes,
AnnotationStore annotations, Map<Integer, AnnotationStore> parameterAnnotations,
Type genericType, Map<Integer, Type> parameterTypeOverrides)
{
super(declaringType, member, memberType, annotations, genericType, null);
- this.parameters = getAnnotatedParameters(this, parameterTypes,
parameterAnnotations, parameterTypeOverrides);
+ this.parameters = getAnnotatedParameters(this, parameterTypes, genericTypes,
parameterAnnotations, parameterTypeOverrides);
}
public List<AnnotatedParameter<X>> getParameters()
@@ -38,7 +38,7 @@
}
- private static <X, Y extends Member> List<AnnotatedParameter<X>>
getAnnotatedParameters(AbstractNewAnnotatedCallable<X, Y> callable, Class<?>[]
parameterTypes, Map<Integer, AnnotationStore> parameterAnnotations, Map<Integer,
Type> parameterTypeOverrides)
+ private static <X, Y extends Member> List<AnnotatedParameter<X>>
getAnnotatedParameters(AbstractNewAnnotatedCallable<X, Y> callable, Class<?>[]
parameterTypes, Type[] genericTypes, Map<Integer, AnnotationStore>
parameterAnnotations, Map<Integer, Type> parameterTypeOverrides)
{
List<AnnotatedParameter<X>> parameters = new
ArrayList<AnnotatedParameter<X>>();
int len = parameterTypes.length;
@@ -54,7 +54,7 @@
{
over = parameterTypeOverrides.get(i);
}
- NewAnnotatedParameter<X> p = new NewAnnotatedParameter<X>(callable,
parameterTypes[i], i, builder.create(), over);
+ NewAnnotatedParameter<X> p = new NewAnnotatedParameter<X>(callable,
parameterTypes[i], i, builder.create(), genericTypes[i], over);
parameters.add(p);
}
return parameters;
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedConstructor.java
===================================================================
---
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedConstructor.java 2010-04-11
12:20:16 UTC (rev 6089)
+++
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedConstructor.java 2010-04-12
06:45:49 UTC (rev 6090)
@@ -16,7 +16,7 @@
NewAnnotatedConstructor(NewAnnotatedType<X> type, Constructor<?>
constructor, AnnotationStore annotations, Map<Integer, AnnotationStore>
parameterAnnotations, Map<Integer, Type> typeOverrides)
{
- super(type, (Constructor<X>) constructor, constructor.getDeclaringClass(),
constructor.getParameterTypes(), annotations, parameterAnnotations, null, typeOverrides);
+ super(type, (Constructor<X>) constructor, constructor.getDeclaringClass(),
constructor.getParameterTypes(), constructor.getGenericParameterTypes(), annotations,
parameterAnnotations, null, typeOverrides);
}
}
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedMethod.java
===================================================================
---
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedMethod.java 2010-04-11
12:20:16 UTC (rev 6089)
+++
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedMethod.java 2010-04-12
06:45:49 UTC (rev 6090)
@@ -16,7 +16,7 @@
{
NewAnnotatedMethod(AnnotatedType<X> type, Method method, AnnotationStore
annotations, Map<Integer, AnnotationStore> parameterAnnotations, Map<Integer,
Type> parameterTypeOverrides)
{
- super(type, method, method.getReturnType(), method.getParameterTypes(),
annotations, parameterAnnotations, method.getGenericReturnType(),
parameterTypeOverrides);
+ super(type, method, method.getReturnType(), method.getParameterTypes(),
method.getGenericParameterTypes(), annotations, parameterAnnotations,
method.getGenericReturnType(), parameterTypeOverrides);
}
}
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedParameter.java
===================================================================
---
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedParameter.java 2010-04-11
12:20:16 UTC (rev 6089)
+++
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/annotated/NewAnnotatedParameter.java 2010-04-12
06:45:49 UTC (rev 6090)
@@ -16,7 +16,7 @@
private final int position;
private final AnnotatedCallable<X> declaringCallable;
- NewAnnotatedParameter(AnnotatedCallable<X> declaringCallable, Class<?>
type, int position, AnnotationStore annotations, Type typeOverride)
+ NewAnnotatedParameter(AnnotatedCallable<X> declaringCallable, Class<?>
type, int position, AnnotationStore annotations, Type genericType, Type typeOverride)
{
super(type, annotations, null, typeOverride);
this.declaringCallable = declaringCallable;