public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }
public void begin_class(int version, final int access, String className, final Type superType, final Type[] interfaces, String source) { final Type classType = Type.getType("L" + className.replace('.', '/') + ";"); classInfo = new ClassInfo() { public Type getType() { return classType; } public Type getSuperType() { return (superType != null) ? superType : Constants.TYPE_OBJECT; } public Type[] getInterfaces() { return interfaces; } public int getModifiers() { return access; } }; cv.visit(version, access, classInfo.getType().getInternalName(), null, classInfo.getSuperType().getInternalName(), TypeUtils.toInternalNames(interfaces)); if (source != null) cv.visitSource(source, null); init(); }
public Type getClassType() { return classInfo.getType(); }
public Type getSuperType() { return classInfo.getSuperType(); }
public int getAccess() { return classInfo.getModifiers(); }
public Type getClassType() { return classInfo.getType(); }
public Type getSuperType() { return classInfo.getSuperType(); }
public int getAccess() { return classInfo.getModifiers(); }
public String toString() { // TODO: include modifiers, superType, interfaces return getType().getClassName(); } }
public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }
public void begin_class(int version, final int access, String className, final Type superType, final Type[] interfaces, String source) { final Type classType = Type.getType("L" + className.replace('.', '/') + ";"); classInfo = new ClassInfo() { public Type getType() { return classType; } public Type getSuperType() { return (superType != null) ? superType : Constants.TYPE_OBJECT; } public Type[] getInterfaces() { return interfaces; } public int getModifiers() { return access; } }; cv.visit(version, access, classInfo.getType().getInternalName(), null, classInfo.getSuperType().getInternalName(), TypeUtils.toInternalNames(interfaces)); if (source != null) cv.visitSource(source, null); init(); }
public Type getSuperType() { return classInfo.getSuperType(); }
public int getAccess() { return classInfo.getModifiers(); }
public String toString() { // TODO: include modifiers, superType, interfaces return getType().getClassName(); } }
public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }
public void begin_class(int version, final int access, String className, final Type superType, final Type[] interfaces, String source) { final Type classType = Type.getType("L" + className.replace('.', '/') + ";"); classInfo = new ClassInfo() { public Type getType() { return classType; } public Type getSuperType() { return (superType != null) ? superType : Constants.TYPE_OBJECT; } public Type[] getInterfaces() { return interfaces; } public int getModifiers() { return access; } }; cv.visit(version, access, classInfo.getType().getInternalName(), null, classInfo.getSuperType().getInternalName(), TypeUtils.toInternalNames(interfaces)); if (source != null) cv.visitSource(source, null); init(); }
public Type getSuperType() { return classInfo.getSuperType(); }
public int getAccess() { return classInfo.getModifiers(); }
public void invoke(MethodInfo method, Type virtualType) { ClassInfo classInfo = method.getClassInfo(); Type type = classInfo.getType(); Signature sig = method.getSignature(); if (sig.getName().equals(Constants.CONSTRUCTOR_NAME)) { invoke_constructor(type, sig); } else if (TypeUtils.isInterface(classInfo.getModifiers())) { invoke_interface(type, sig); } else if (TypeUtils.isStatic(method.getModifiers())) { invoke_static(type, sig); } else { invoke_virtual(virtualType, sig); } }