B
Benji
I'm writing a specialized classloader by extending SecureClassLoader, and
overwriting findClass. (it looks through a specified directory, among
other things. It rewrites classes as they're loaded in, which is why I
can't use a URLClassLoader). It works fine on classes that are in the
directory, classes in the parent classloader, and array types of classes
in the parent classloader. But the one thing that it can't load is
array types from the current classloader. If I call
loadClass("[[LHelloWorld;"), loadClass ends up calling findClass with the
String "[[LHelloWorld;". Shouldn't loadClass be dealing with figuring
out that it's an array type, and not passing me the [[L garbage?
Is there a way to manually define an array Class from another Class?
overwriting findClass. (it looks through a specified directory, among
other things. It rewrites classes as they're loaded in, which is why I
can't use a URLClassLoader). It works fine on classes that are in the
directory, classes in the parent classloader, and array types of classes
in the parent classloader. But the one thing that it can't load is
array types from the current classloader. If I call
loadClass("[[LHelloWorld;"), loadClass ends up calling findClass with the
String "[[LHelloWorld;". Shouldn't loadClass be dealing with figuring
out that it's an array type, and not passing me the [[L garbage?
Is there a way to manually define an array Class from another Class?