problem with vargs method
blackdrag at gmx.org
Tue Feb 7 08:04:30 PST 2012
maybe someone can explain to me why method handles behave this way in my
Bascially I have a handle for Class#getDeclaredConstructor(Class...) I
created via unreflect.
this handle is then created as a AdapterMethodHandle$AsVargsCollector.
My targetType is Object(Object,Object) and the arguments to the call are
the Class, and an empty Class. So the next steps are asType with the
target type, adding a guard with catch, then my guards for the arguments
and last I do an invokeWithArguments.
What I get now is a ClassCastException with the message required class
java.lang.Class but encountered class [Ljava.lang.Class;
The guards are unrelated to the problem, since it happens without them
Now can anyone explain me why I get that exception? It doesn't really
make sense to me atm.
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org
More information about the mlvm-dev