public void invokeVirtual(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params) { invokeVirtual(getClassName(classDesc), methodName, ret, params); }
public void invokeVirtual(String className, String methodName, TypeDesc ret, TypeDesc[] params) { mInstructions.new InvokeInstruction (Opcode.INVOKEVIRTUAL, mCp.addConstantMethod(className, methodName, ret, params), ret, params); }
invokeVirtual(from.getRootName(), methodName, to, null);
mInstructions.new LoadConstantInstruction(1, TypeDesc.STRING, info); invokeVirtual(stringBufferDesc, "append", stringBufferDesc, stringParam); invokeVirtual(stringBufferDesc, "toString", stringDesc, null);
b.invokeVirtual(atomicRefType, "get", TypeDesc.OBJECT, null); b.checkCast(TypeDesc.forClass(mType)); b.invokeVirtual(atomicRefType, "get", TypeDesc.OBJECT, null); b.checkCast(TypeDesc.forClass(mType));
/** * Appends a String to a StringBuilder. A StringBuilder and String must be * on the stack, and a StringBuilder is left on the stack after the call. */ public static void callStringBuilderAppendString(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "append", stringBuilder, new TypeDesc[] {TypeDesc.STRING}); }
/** * Calls length on a StringBuilder on the stack, leaving an int on the stack. */ public static void callStringBuilderLength(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "length", TypeDesc.INT, null); }
/** * Calls setLength on a StringBuilder. A StringBuilder and int must be on * the stack, and both are consumed after the call. */ public static void callStringBuilderSetLength(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "setLength", null, new TypeDesc[] {TypeDesc.INT}); }
public void invokeVirtual(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params) { invokeVirtual(getClassName(classDesc), methodName, ret, params); }
/** * Calls toString on a StringBuilder. A StringBuilder must be on the stack, * and a String is left on the stack after the call. */ public static void callStringBuilderToString(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "toString", TypeDesc.STRING, null); } }
/** * Appends a char to a StringBuilder. A StringBuilder and char must be on * the stack, and a StringBuilder is left on the stack after the call. */ public static void callStringBuilderAppendChar(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "append", stringBuilder, new TypeDesc[] {TypeDesc.CHAR}); }
/** * Appends a char to a StringBuilder. A StringBuilder and char must be on * the stack, and a StringBuilder is left on the stack after the call. */ public static void callStringBuilderAppendChar(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "append", stringBuilder, new TypeDesc[] {TypeDesc.CHAR}); }
/** * Calls length on a StringBuilder on the stack, leaving an int on the stack. */ public static void callStringBuilderLength(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "length", TypeDesc.INT, null); }
/** * Calls setLength on a StringBuilder. A StringBuilder and int must be on * the stack, and both are consumed after the call. */ public static void callStringBuilderSetLength(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "setLength", null, new TypeDesc[] {TypeDesc.INT}); }
/** * Calls toString on a StringBuilder. A StringBuilder must be on the stack, * and a String is left on the stack after the call. */ public static void callStringBuilderToString(CodeBuilder b) { // Because of JDK1.5 bug which exposes AbstractStringBuilder class, // cannot use reflection to get method signature. TypeDesc stringBuilder = TypeDesc.forClass(StringBuilder.class); b.invokeVirtual(stringBuilder, "toString", TypeDesc.STRING, null); } }
b.invoke(bp.getReadMethod()); b.convert(TypeDesc.forClass(bp.getType()), TypeDesc.OBJECT); b.invokeVirtual(Object.class.getName(), "equals", TypeDesc.BOOLEAN, params);
b.invokeVirtual(String.class.getName(), "hashCode", TypeDesc.INT, null); b.loadConstant(0x7fffffff); b.math(Opcode.IAND); b.invokeVirtual(String.class.getName(), "equals", TypeDesc.BOOLEAN, params);
public void invokeVirtual(String className, String methodName, TypeDesc ret, TypeDesc[] params) { mInstructions.new InvokeInstruction (Opcode.INVOKEVIRTUAL, mCp.addConstantMethod(className, methodName, ret, params), ret, params); }
private void genWaitForNext(CodeBuilder b, LocalVariable sequenceVar) { TypeDesc orderedInvokerType = TypeDesc.forClass(OrderedInvoker.class); b.loadThis(); b.loadField(ORDERED_INVOKER_FIELD_NAME, orderedInvokerType); b.loadLocal(sequenceVar); b.invokeVirtual(orderedInvokerType, "waitForNext", TypeDesc.BOOLEAN, new TypeDesc[] {TypeDesc.INT}); }
private void genIsNext(CodeBuilder b, LocalVariable sequenceVar) { TypeDesc orderedInvokerType = TypeDesc.forClass(OrderedInvoker.class); b.loadThis(); b.loadField(ORDERED_INVOKER_FIELD_NAME, orderedInvokerType); b.loadLocal(sequenceVar); b.invokeVirtual(orderedInvokerType, "isNext", TypeDesc.BOOLEAN, new TypeDesc[] {TypeDesc.INT}); }