>We should maybe add an optional parameter to array:
>such that array(...,class,n) is a n+1 dimensional class array .
OK, but would it not be more intuitive to specify the actual dimension with a
default value of 1?
As a point of interest, if I'd used the thread context class loader (findClass
method?) would that have been better?
From: rpcee <rpcee@...>
> As a point of interest, if I'd used the thread context class loader
> method?) would that have been better?
In general no, but YMMV.
Btw findClass is protected and does not deal with the creation
of array classes, probably findLoadedClass does but that is private.
You could have used loadClass (which uses the previous two)
of the right classloader, or better
Class.forName with the optional classloader parm that can deal
with a null classloader (meaning the bootstrap one) (the method is only Java
In general as long as possible avoiding to deal with classloaders
is the easier choice. Otherwise I would use Class.getClassLoader
everytime is possible and then Class.forName with the opt
> many thanks. I also solved it with
> but i prefer your version.
The getClass technique has also the
advantage to work even in the case
the class classloader is not one of the usual
forName approach then would become
We should maybe add an optional parameter to array:
such that array(...,class,n) is a n+1 dimensional class array .
So in you case you would write:
Get latest updates about Open Source Projects, Conferences and News.