diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-05-16 14:53:51 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-05-16 14:53:51 +0000 |
commit | 5b7f8857037a9fd931ef1d6171fee6e7f2f0ec2e (patch) | |
tree | 82492226c90fe719a9d6c606de9ad83e61608c9a /src/main/javassist/ClassPool.java | |
parent | d555274962db5f50c330c735a1b396376faa4891 (diff) | |
download | javassist-5b7f8857037a9fd931ef1d6171fee6e7f2f0ec2e.tar.gz javassist-5b7f8857037a9fd931ef1d6171fee6e7f2f0ec2e.zip |
Changed ClassPool.get() to accept the descriptors of array types.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@170 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/ClassPool.java')
-rw-r--r-- | src/main/javassist/ClassPool.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/javassist/ClassPool.java b/src/main/javassist/ClassPool.java index 28b795c6..bf1c73ac 100644 --- a/src/main/javassist/ClassPool.java +++ b/src/main/javassist/ClassPool.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.Hashtable; +import javassist.bytecode.Descriptor; /** * A container of <code>CtClass</code> objects. @@ -348,6 +349,10 @@ public class ClassPool { * @return null if the class file could not be found. */ protected CtClass createCtClass(String classname, boolean useCache) { + // accept "[L<class name>;" as a class name. + if (classname.charAt(0) == '[') + classname = Descriptor.toClassName(classname); + if (classname.endsWith("[]")) { String base = classname.substring(0, classname.indexOf('[')); if ((!useCache || getCached(base) == null) && find(base) == null) |