/** * 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(); }
c.branchEnd(b); c.newInstruction(BAD_REQUEST_EXCEPTION); c.dup(); c.invokespecial(BAD_REQUEST_EXCEPTION, "<init>", "()V");
sc.branchEnd(end); sc.pop(); sc.newInstruction(HTTP_STRING_CLASS); sc.dup(); if (state.terminalState != null) {
c.branchEnd(b); c.newInstruction(BAD_REQUEST_EXCEPTION); c.dup(); c.invokespecial(BAD_REQUEST_EXCEPTION, "<init>", "()V"); BranchEnd correctLength = c.ifIcmpeq(); c.newInstruction(HTTP_STRING_CLASS); c.dup(); c.aload(STATE_CURRENT_BYTES_VAR); c.branchEnd(b); c.newInstruction(BAD_REQUEST_EXCEPTION); c.dup(); c.invokespecial(BAD_REQUEST_EXCEPTION, "<init>", "()V"); c.invokevirtual(StringBuilder.class.getName(), "toString", "()Ljava/lang/String;"); c.newInstruction(HTTP_STRING_CLASS); c.dupX1(); c.swap();
public void newInstruction(Class<?> clazz) { newInstruction(clazz.getName()); }
public void newInstruction(Class<?> clazz) { newInstruction(clazz.getName()); }
public void newInstruction(Class<?> clazz) { newInstruction(clazz.getName()); }
public void newInstruction(Class<?> clazz) { newInstruction(clazz.getName()); }
public void newInstruction(Class<?> clazz) { newInstruction(clazz.getName()); }
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
ca.newInstruction(ClassIdentifier.class); ca.dup(); ca.ldc(classFile.getName());
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
@Override protected void addSerializationSupport(ClassFile proxyClassType) { final Class<Exception>[] exceptions = new Class[]{ObjectStreamException.class}; final ClassMethod writeReplace = proxyClassType.addMethod(AccessFlag.PRIVATE, "writeReplace", LJAVA_LANG_OBJECT); writeReplace.addCheckedExceptions(exceptions); CodeAttribute b = writeReplace.getCodeAttribute(); b.newInstruction(SerializableClientProxy.class.getName()); b.dup(); b.aload(0); b.getfield(proxyClassType.getName(), BEAN_ID_FIELD, BeanIdentifier.class); b.aload(0); b.getfield(proxyClassType.getName(), CONTEXT_ID_FIELD, String.class); b.invokespecial(SerializableClientProxy.class.getName(), INIT_METHOD_NAME, "(" + LBEAN_IDENTIFIER + LJAVA_LANG_STRING + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }