diff options
author | kkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-07-14 10:04:35 +0000 |
---|---|---|
committer | kkhan <kkhan@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2006-07-14 10:04:35 +0000 |
commit | 24335472785efe247cafffceffefbe35d9963bfc (patch) | |
tree | 2e92771a9422a3f7c7790ab265679a6fa02347f5 /src/main/javassist/bytecode/annotation/ClassMemberValue.java | |
parent | 77aebc2d429bda3b0025754f52e4023d86ce48b5 (diff) | |
download | javassist-24335472785efe247cafffceffefbe35d9963bfc.tar.gz javassist-24335472785efe247cafffceffefbe35d9963bfc.zip |
Move handling of primitive class value from MemberValue to ClassMemberValue
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@292 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/annotation/ClassMemberValue.java')
-rw-r--r-- | src/main/javassist/bytecode/annotation/ClassMemberValue.java | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/main/javassist/bytecode/annotation/ClassMemberValue.java b/src/main/javassist/bytecode/annotation/ClassMemberValue.java index cf2f510b..af2a6c36 100644 --- a/src/main/javassist/bytecode/annotation/ClassMemberValue.java +++ b/src/main/javassist/bytecode/annotation/ClassMemberValue.java @@ -63,7 +63,44 @@ public class ClassMemberValue extends MemberValue { Object getValue(ClassLoader cl, ClassPool cp, Method m) throws ClassNotFoundException { - return loadClass(cl, getValue()); + final String classname = getValue(); + if (classname.equals("void")) + { + return void.class; + } + if (classname.equals("int")) + { + return int.class; + } + if (classname.equals("byte")) + { + return byte.class; + } + if (classname.equals("long")) + { + return long.class; + } + if (classname.equals("double")) + { + return double.class; + } + if (classname.equals("float")) + { + return float.class; + } + if (classname.equals("char")) + { + return char.class; + } + if (classname.equals("short")) + { + return short.class; + } + if (classname.equals("boolean")) + { + return boolean.class; + } + return loadClass(cl, classname); } Class getType(ClassLoader cl) throws ClassNotFoundException { |