LocalVariable[] paramVars = new LocalVariable[paramTypes.length]; for (int i=paramVars.length; --i>=0; ) { LocalVariable paramVar = createLocalVariable(null, paramTypes[i]); storeLocal(paramVar); paramVars[i] = paramVar; Label returnLocation = createLabel(); CodeDisassembler cd = new CodeDisassembler(defineMethod); cd.disassemble(this, paramVars, returnLocation);
default: if (choice == "==") { ifEqualBranch(location, true); } else if (choice == "!=") { ifEqualBranch(location, false); } else { throw new IllegalArgumentException case TypeDesc.SHORT_CODE: case TypeDesc.INT_CODE: ifComparisonBranch(location, choice); return; math(Opcode.LCMP); break; math((choice == (trueBranch ? "<=" : ">") || choice == (trueBranch ? "<" : ">=")) ? Opcode.FCMPG : Opcode.FCMPL); break; math((choice == (trueBranch ? "<=" : ">") || choice == (trueBranch ? "<" : ">=")) ? Opcode.DCMPG : Opcode.DCMPL); break; ifZeroComparisonBranch(location, choice);
public void invoke(Constructor constructor) { Class[] paramClasses = constructor.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } invokeConstructor(constructor.getDeclaringClass().getName().toString(), params); } }
public void invoke(Method method) { TypeDesc ret = TypeDesc.forClass(method.getReturnType()); Class[] paramClasses = method.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } Class clazz = method.getDeclaringClass(); if (Modifier.isStatic(method.getModifiers())) { invokeStatic(clazz.getName(), method.getName(), ret, params); } else if (clazz.isInterface()) { invokeInterface(clazz.getName(), method.getName(), ret, params); } else { invokeVirtual(clazz.getName(), method.getName(), ret, params); } }
public void invokeSuper(Method method) { TypeDesc ret = TypeDesc.forClass(method.getReturnType()); Class[] paramClasses = method.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } invokeSuper(method.getDeclaringClass().getName(), method.getName(), ret, params); }
public LocalVariable createLocalVariable(TypeDesc type) { return createLocalVariable(null, type); }
public void invoke(Method method) { TypeDesc ret = TypeDesc.forClass(method.getReturnType()); Class[] paramClasses = method.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } Class clazz = method.getDeclaringClass(); if (Modifier.isStatic(method.getModifiers())) { invokeStatic(clazz.getName(), method.getName(), ret, params); } else if (clazz.isInterface()) { invokeInterface(clazz.getName(), method.getName(), ret, params); } else { invokeVirtual(clazz.getName(), method.getName(), ret, params); } }
public void invokeSuper(Method method) { TypeDesc ret = TypeDesc.forClass(method.getReturnType()); Class[] paramClasses = method.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } invokeSuper(method.getDeclaringClass().getName(), method.getName(), ret, params); }
default: if (choice == "==") { ifEqualBranch(location, true); } else if (choice == "!=") { ifEqualBranch(location, false); } else { throw new IllegalArgumentException case TypeDesc.SHORT_CODE: case TypeDesc.INT_CODE: ifComparisonBranch(location, choice); return; math(Opcode.LCMP); break; math((choice == (trueBranch ? "<=" : ">") || choice == (trueBranch ? "<" : ">=")) ? Opcode.FCMPG : Opcode.FCMPL); break; math((choice == (trueBranch ? "<=" : ">") || choice == (trueBranch ? "<" : ">=")) ? Opcode.DCMPG : Opcode.DCMPL); break; ifZeroComparisonBranch(location, choice);
LocalVariable[] paramVars = new LocalVariable[paramTypes.length]; for (int i=paramVars.length; --i>=0; ) { LocalVariable paramVar = createLocalVariable(paramTypes[i]); storeLocal(paramVar); paramVars[i] = paramVar; Label returnLocation = createLabel(); CodeDisassembler cd = new CodeDisassembler(defineMethod); cd.disassemble(this, paramVars, returnLocation);
public void invoke(Constructor constructor) { Class[] paramClasses = constructor.getParameterTypes(); TypeDesc[] params = new TypeDesc[paramClasses.length]; for (int i=0; i<params.length; i++) { params[i] = TypeDesc.forClass(paramClasses[i]); } invokeConstructor(constructor.getDeclaringClass().getName().toString(), params); } }