private void handleReturnIfNoMoreBytes(final CodeAttribute c, final CodeLocation returnCode) { c.aload(BYTE_BUFFER_VAR); c.invokevirtual(ByteBuffer.class.getName(), "hasRemaining", "()Z"); c.ifEq(returnCode); //go back to the start if we have not run out of bytes }
@Override public void handleStateMachineMatchedToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(HTTP_RESPONSE_CLASS, "setProtocol", "(" + HTTP_STRING_DESCRIPTOR + ")V"); }
@Override public void handleOtherToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(HTTP_RESPONSE_CLASS, "setProtocol", "(" + HTTP_STRING_DESCRIPTOR + ")V"); }
@Override public void handleStateMachineMatchedToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(resultClass, "setProtocol", "(" + HTTP_STRING_DESCRIPTOR + ")" + HTTP_EXCHANGE_DESCRIPTOR); c.pop(); }
@Override public void handleOtherToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(resultClass, "setProtocol", "(" + HTTP_STRING_DESCRIPTOR + ")"+ HTTP_EXCHANGE_DESCRIPTOR); c.pop(); }
@Override public void handleStateMachineMatchedToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(resultClass, "setRequestMethod", "(" + HTTP_STRING_DESCRIPTOR + ")" + HTTP_EXCHANGE_DESCRIPTOR); c.pop(); }
@Override public void handleOtherToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.dup(); c.invokestatic(CONNECTORS_CLASS, "verifyToken", "(" + HTTP_STRING_DESCRIPTOR + ")V"); c.invokevirtual(resultClass, "setRequestMethod", "(" + HTTP_STRING_DESCRIPTOR + ")" + HTTP_EXCHANGE_DESCRIPTOR); c.pop(); }
final CodeAttribute codeAttribute = method.getCodeAttribute(); codeAttribute.aload(1); codeAttribute.invokevirtual("java/io/ObjectInputStream", "readObject", "()Ljava/lang/Object;"); codeAttribute.returnInstruction();
ret = DescriptorUtils.makeDescriptor(returnType); ca.invokevirtual(superclass.getName(), invoke, "(Ljava/lang/String;Lorg/wildfly/iiop/openjdk/rmi/marshal/strategy/StubStrategy;[Ljava/lang/Object;)" + ret); if (!returnType.isPrimitive() && returnType != Object.class) { ca.checkcast(returnType);
c.invokevirtual(ByteBuffer.class.getName(), "get", "()B"); BranchEnd cont = c.gotoInstruction(); c.branchEnd(end); c.invokevirtual(ByteBuffer.class.getName(), "get", "()B"); c.invokevirtual(StringBuilder.class.getName(), "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;"); c.swap(); c.invokevirtual(StringBuilder.class.getName(), "append", "(C)Ljava/lang/StringBuilder;"); c.pop(); c.invokevirtual(parseStateClass, "parseComplete", "()V"); c.iconst(0); c.returnInstruction();
c.invokevirtual(ByteBuffer.class.getName(), "hasRemaining", "()Z"); final BranchEnd nonZero = c.ifne(); c.aload(STATE_STRING_BUILDER_VAR); c.iconst(0); c.invokevirtual(StringBuilder.class.getName(), "setLength", "(I)V"); c.iconst(0); c.putfield(parseStateClass, "parseState", "I"); c.invokevirtual(ByteBuffer.class.getName(), "get", "()B"); c.dup(); c.dup(); c.invokevirtual(HTTP_STRING_CLASS, "toString", "()Ljava/lang/String;"); c.iconst(0); c.iload(STATE_POS_VAR); c.invokevirtual(String.class.getName(), "substring", "(II)Ljava/lang/String;"); c.invokevirtual(StringBuilder.class.getName(), "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;"); c.swap(); c.invokevirtual(StringBuilder.class.getName(), "append", "(C)Ljava/lang/StringBuilder;"); c.pop2(); BranchEnd prefixToNoState = c.gotoInstruction(); c.invokevirtual(ByteBuffer.class.getName(), "get", "()B"); c.dup(); c.invokevirtual(StringBuilder.class.getName(), "append", "(C)Ljava/lang/StringBuilder;"); c.pop();
sc.ldc(state.terminalState); sc.ldc("ISO-8859-1"); sc.invokevirtual(String.class.getName(), "getBytes", "(Ljava/lang/String;)[B"); sc.putstatic(file.getName(), state.fieldName, "[B");
static public CodeAttribute unboxFloat(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "floatValue", "()F"); return bc; }
static public CodeAttribute unboxInt(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "intValue", "()I"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxChar(CodeAttribute bc) { bc.checkcast("java.lang.Character"); bc.invokevirtual("java.lang.Character", "charValue", "()C"); return bc; }
static public CodeAttribute unboxByte(CodeAttribute bc) { bc.checkcast("java.lang.Number"); bc.invokevirtual("java.lang.Number", "byteValue", "()B"); return bc; }
static public CodeAttribute unboxChar(CodeAttribute bc) { bc.checkcast("java.lang.Character"); bc.invokevirtual("java.lang.Character", "charValue", "()C"); return bc; }
private void loadBeanInstance(ClassFile file, MethodInformation methodInfo, CodeAttribute b) { b.aload(0); getMethodHandlerField(file, b); // lets invoke the method b.invokevirtual(ProxyMethodHandler.class.getName(), "getInstance", EMPTY_PARENTHESES + LJAVA_LANG_OBJECT); b.checkcast(methodInfo.getDeclaringClass()); }