Author: pete.muir(a)jboss.org
Date: 2010-01-30 08:29:43 -0500 (Sat, 30 Jan 2010)
New Revision: 5677
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
Log:
Discovering concrete type from base type is too hard ;-)
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java 2010-01-30
13:27:58 UTC (rev 5676)
+++
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java 2010-01-30
13:29:43 UTC (rev 5677)
@@ -77,7 +77,7 @@
public static <T> WeldConstructor<T> of(AnnotatedConstructor<T>
annotatedConstructor, WeldClass<T> declaringClass, ClassTransformer
classTransformer)
{
- return new WeldConstructorImpl<T>(annotatedConstructor.getJavaMember(),
Reflections.<T>getRawType(annotatedConstructor.getBaseType()),
annotatedConstructor.getBaseType(), annotatedConstructor,
annotatedConstructor.getTypeClosure(),
buildAnnotationMap(annotatedConstructor.getAnnotations()),
buildAnnotationMap(annotatedConstructor.getAnnotations()), declaringClass,
classTransformer);
+ return new WeldConstructorImpl<T>(annotatedConstructor.getJavaMember(),
annotatedConstructor.getJavaMember().getDeclaringClass(),
annotatedConstructor.getBaseType(), annotatedConstructor,
annotatedConstructor.getTypeClosure(),
buildAnnotationMap(annotatedConstructor.getAnnotations()),
buildAnnotationMap(annotatedConstructor.getAnnotations()), declaringClass,
classTransformer);
}
/**
@@ -173,7 +173,7 @@
{
for (AnnotatedParameter<T> annotatedParameter :
annotatedConstructor.getParameters())
{
- WeldParameter<?, T> parameter =
WeldParameterImpl.of(annotatedParameter.getAnnotations(),
Reflections.getRawType(annotatedParameter.getBaseType()),
annotatedParameter.getBaseType(), this, annotatedParameter.getPosition(),
classTransformer);
+ WeldParameter<?, T> parameter =
WeldParameterImpl.of(annotatedParameter.getAnnotations(),
constructor.getParameterTypes()[annotatedParameter.getPosition()],
annotatedParameter.getBaseType(), this, annotatedParameter.getPosition(),
classTransformer);
this.parameters.add(parameter);
for (Annotation annotation : parameter.getAnnotations())
{
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
===================================================================
---
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-01-30
13:27:58 UTC (rev 5676)
+++
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2010-01-30
13:29:43 UTC (rev 5677)
@@ -80,7 +80,7 @@
public static <T, X> WeldMethodImpl<T, X> of(AnnotatedMethod<? super
X> method, WeldClass<X> declaringClass, ClassTransformer classTransformer)
{
- return new WeldMethodImpl<T, X>(method.getJavaMember(),
Reflections.<T>getRawType(method.getBaseType()), method.getBaseType(),
method.getTypeClosure(), method, buildAnnotationMap(method.getAnnotations()),
buildAnnotationMap(method.getAnnotations()), declaringClass, classTransformer);
+ return new WeldMethodImpl<T, X>(method.getJavaMember(), (Class<T>)
method.getJavaMember().getReturnType(), method.getBaseType(), method.getTypeClosure(),
method, buildAnnotationMap(method.getAnnotations()),
buildAnnotationMap(method.getAnnotations()), declaringClass, classTransformer);
}
/**
@@ -137,7 +137,7 @@
{
for (AnnotatedParameter<? super X> annotatedParameter :
annotatedMethod.getParameters())
{
- WeldParameter<?, X> parameter =
WeldParameterImpl.of(annotatedParameter.getAnnotations(),
Reflections.getRawType(annotatedParameter.getBaseType()),
annotatedParameter.getBaseType(), this, annotatedParameter.getPosition(),
classTransformer);
+ WeldParameter<?, X> parameter =
WeldParameterImpl.of(annotatedParameter.getAnnotations(),
method.getParameterTypes()[annotatedParameter.getPosition()],
annotatedParameter.getBaseType(), this, annotatedParameter.getPosition(),
classTransformer);
this.parameters.add(parameter);
for (Annotation annotation : parameter.getAnnotations())
{