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 {
static Class loadClass(ClassLoader cl, String classname)
throws ClassNotFoundException
{
- 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 Class.forName(classname, true, cl);
}