[weld-commits] Weld SVN: r6840 - in core/trunk/impl/src/main/java/org/jboss/weld: util and 1 other directory.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Thu Jul 29 12:36:34 EDT 2010
Author: pete.muir at jboss.org
Date: 2010-07-29 12:36:33 -0400 (Thu, 29 Jul 2010)
New Revision: 6840
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
core/trunk/impl/src/main/java/org/jboss/weld/util/Names.java
Log:
improve error message
Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java 2010-07-29 16:35:36 UTC (rev 6839)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java 2010-07-29 16:36:33 UTC (rev 6840)
@@ -140,7 +140,7 @@
@Override
public String toString()
{
- return Names.parameterToString(getJavaClass(), getAnnotations(), getActualTypeArguments());
+ return Names.parameterToString(getPosition(), getDeclaringCallable().getJavaMember(), getJavaClass(), getAnnotations(), getActualTypeArguments());
}
public AnnotatedCallable<X> getDeclaringCallable()
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Names.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Names.java 2010-07-29 16:35:36 UTC (rev 6839)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Names.java 2010-07-29 16:36:33 UTC (rev 6840)
@@ -19,6 +19,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
+import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
@@ -95,9 +96,9 @@
return new NamesStringBuilder("constructor for " + constructor.getDeclaringClass().getName()).add(modifiersToString(constructor.getModifiers())).add(annotationsToString(annotations)).add(constructor.getName()).add(typesToString(actualTypeArguments)).add(parametersToString(parameters)).toString();
}
- public static String parameterToString(Class<?> rawType, Set<Annotation> annotations, Type[] actualTypeArguments)
+ public static String parameterToString(int position, Member member, Class<?> rawType, Set<Annotation> annotations, Type[] actualTypeArguments)
{
- return new NamesStringBuilder().add(modifiersToString(rawType.getModifiers())).add(annotationsToString(annotations)).add(rawType.getName()).add(typesToString(actualTypeArguments)).toString();
+ return new NamesStringBuilder().add("parameter " + position + " on " + member + "; " + modifiersToString(rawType.getModifiers())).add(annotationsToString(annotations)).add(rawType.getName()).add(typesToString(actualTypeArguments)).toString();
}
/**
More information about the weld-commits
mailing list