public Type getClassType() { return classInfo.getType(); }
public Type getClassType() { return classInfo.getType(); }
public String toString() { // TODO: include modifiers, superType, interfaces return getType().getClassName(); } }
public String toString() { // TODO: include modifiers, superType, interfaces return getType().getClassName(); } }
public int hashCode() { return getType().hashCode(); }
public int hashCode() { return getType().hashCode(); }
public void invoke(MethodInfo method) { invoke(method, method.getClassInfo().getType()); } }
public void invoke(MethodInfo method) { invoke(method, method.getClassInfo().getType()); } }
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 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 void generate(ClassEmitter ce, Context context, List methods) { for (Iterator it = methods.iterator(); it.hasNext();) { MethodInfo method = (MethodInfo)it.next(); if (!TypeUtils.isProtected(method.getModifiers())) { CodeEmitter e = context.beginMethod(ce, method); context.emitCallback(e, context.getIndex(method)); if (proxyRef) { e.load_this(); e.invoke_interface(PROXY_REF_DISPATCHER, PROXY_REF_LOAD_OBJECT); } else { e.invoke_interface(DISPATCHER, LOAD_OBJECT); } e.checkcast(method.getClassInfo().getType()); e.load_args(); e.invoke(method); e.return_value(); e.end_method(); } } }
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 generate(ClassEmitter ce, Context context, List methods) { for (Iterator it = methods.iterator(); it.hasNext();) { MethodInfo method = (MethodInfo)it.next(); if (!TypeUtils.isProtected(method.getModifiers())) { CodeEmitter e = context.beginMethod(ce, method); context.emitCallback(e, context.getIndex(method)); if (proxyRef) { e.load_this(); e.invoke_interface(PROXY_REF_DISPATCHER, PROXY_REF_LOAD_OBJECT); } else { e.invoke_interface(DISPATCHER, LOAD_OBJECT); } e.checkcast(method.getClassInfo().getType()); e.load_args(); e.invoke(method); e.return_value(); e.end_method(); } } }
public static void load_method(CodeEmitter e, MethodInfo method) { load_class(e, method.getClassInfo().getType()); e.push(method.getSignature().getName()); push_object(e, method.getSignature().getArgumentTypes()); e.invoke_virtual(Constants.TYPE_CLASS, GET_DECLARED_METHOD); }
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 static void load_method(CodeEmitter e, MethodInfo method) { load_class(e, method.getClassInfo().getType()); e.push(method.getSignature().getName()); push_object(e, method.getSignature().getArgumentTypes()); e.invoke_virtual(Constants.TYPE_CLASS, GET_DECLARED_METHOD); }
e.dup(); e.invoke_virtual_this(loadMethod(index)); e.checkcast(method.getClassInfo().getType()); e.load_args(); e.invoke(method);
e.getfield(FIELD_NAME); e.aaload((route != null) ? route[i] : i); e.checkcast(method.getClassInfo().getType()); e.load_args(); e.invoke(method);