if (cls.equals(void.class)) { return Type.VOID;
Type tp[] = new Type[cls.length]; for (int i = 0; i < cls.length; i++) { tp[i] = toType(cls[i]);
    static Type toType(Class cls) {                if (cls.equals(void.class)) {            return Type.VOID;        }        if (cls.isPrimitive()) {            if (int.class.equals(cls)) {                return Type.INT;            } else if (char.class.equals(cls)) {                return Type.CHAR;            } else if (short.class.equals(cls)) {                return Type.SHORT;            } else if (byte.class.equals(cls)) {                return Type.BYTE;            } else if (long.class.equals(cls)) {                return Type.LONG;            } else if (float.class.equals(cls)) {                return Type.FLOAT;            } else if (double.class.equals(cls)) {                return Type.DOUBLE;            } else if (boolean.class.equals(cls)) {                return Type.BOOLEAN;            }        } else if (cls.isArray()) {            return new ArrayType( toType(cls.getComponentType()),cls.getName().lastIndexOf('[') + 1);        } else            return new ObjectType(cls.getName());        throw new java.lang.InternalError(cls.getName());    }