!include once #1019934 // BCEL static org.apache.bcel.generic.Type classToBCELType(Class c) { delegate Type to org.apache.bcel.generic. if (c == null) null; if (isPrimitiveType(c)) { if (c == byte.class) ret Type.BYTE; if (c == char.class) ret Type.CHAR; if (c == short.class) ret Type.SHORT; if (c == int.class) ret Type.INT; if (c == long.class) ret Type.LONG; if (c == double.class) ret Type.DOUBLE; if (c == void.class) ret Type.VOID; if (c == bool.class) ret Type.BOOLEAN; fail("TODO: classToBCELType " + c); } if (isArrayType(c)) { int dimensions = 0; while (c.isArray()) { ++dimensions; c = c.componentType(); } ret new ArrayType(classToBCELType(c), dimensions); } ret new ObjectType(className(c)); }