@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(); }
/** * Throws an exception when an invalid state is hit in a tableswitch */ private static void stateNotFound(final CodeAttribute c, final TableSwitchBuilder builder) { c.branchEnd(builder.getDefaultBranchEnd().get()); c.newInstruction(RuntimeException.class); c.dup(); c.ldc("Invalid character"); c.invokespecial(RuntimeException.class.getName(), "<init>", "(Ljava/lang/String;)V"); c.athrow(); }
@Override public void handleOtherToken(final CodeAttribute c) { c.aload(PARSE_STATE_VAR); c.swap(); c.dup(); c.invokestatic(CONNECTORS_CLASS, "verifyToken", "(" + HTTP_STRING_DESCRIPTOR + ")V"); c.putfield(parseStateClass, "nextHeader", HTTP_STRING_DESCRIPTOR); }
@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 handleStateMachineMatchedToken(final CodeAttribute c) { c.aload(HTTP_RESULT); c.swap(); c.invokevirtual(HTTP_RESPONSE_CLASS, "setProtocol", "(" + HTTP_STRING_DESCRIPTOR + ")V"); }
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 }
void jumpTo(final CodeAttribute ca) { if (location == null) { branchEnds.add(ca.gotoInstruction()); } else { ca.gotoInstruction(location); } }
public class ForceClose extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this)); setContentView(R.layout.main); } }
@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 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, "setRequestMethod", "(" + HTTP_STRING_DESCRIPTOR + ")" + HTTP_EXCHANGE_DESCRIPTOR); c.pop(); }