BranchEnd end = sc.ifnull(); sc.checkcast(HTTP_STRING_CLASS); sc.putstatic(file.getName(), state.httpStringFieldName, HTTP_STRING_DESCRIPTOR);
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
/** * Ends interception context if it was previously stated. This is indicated by a local variable with index 0. */ void endIfStarted(CodeAttribute b, ClassMethod method) { b.aload(getLocalVariableIndex(0)); b.dup(); final BranchEnd ifnotnull = b.ifnull(); b.checkcast(Stack.class); b.invokevirtual(Stack.class.getName(), END_INTERCEPTOR_CONTEXT_METHOD_NAME, EMPTY_PARENTHESES + VOID_CLASS_DESCRIPTOR); BranchEnd ifnull = b.gotoInstruction(); b.branchEnd(ifnotnull); b.pop(); // remove null Stack b.branchEnd(ifnull); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }
void startIfNotOnTop(CodeAttribute b, ClassMethod method) { b.aload(0); factory.getMethodHandlerField(method.getClassFile(), b); b.dup(); // if handler != null (may happen inside constructor calls) final BranchEnd handlerNull = b.ifnull(); b.invokestatic(INTERCEPTION_DECORATION_CONTEXT_CLASS_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_NAME, START_INTERCEPTOR_CONTEXT_IF_NOT_ON_TOP_METHOD_SIGNATURE); final BranchEnd endOfIfStatement = b.gotoInstruction(); b.branchEnd(handlerNull); // else started = false // keeping null handler on top of stack b.branchEnd(endOfIfStatement); storeToLocalVariable(0); }