c.aconstNull(); c.putfield(parseStateClass, "current", HTTP_STRING_DESCRIPTOR); c.aconstNull(); c.putfield(parseStateClass, "currentBytes", "[B"); c.aload(STATE_STRING_BUILDER_VAR); c.iconst(0); c.istore(STATE_POS_VAR); c.aconstNull(); c.astore(STATE_CURRENT_VAR); c.aconstNull(); c.astore(STATE_CURRENT_BYTES_VAR);
/** {@inheritDoc} */ @Override public void overrideMethod(ClassMethod method, Method superclassMethod) { CodeAttribute ca = method.getCodeAttribute(); Class<?> returnType = superclassMethod.getReturnType(); if (!returnType.isPrimitive()) { ca.aconstNull(); } else if (returnType == double.class) { ca.dconst(0); } else if (returnType == float.class) { ca.fconst(0); } else if (returnType == long.class) { ca.lconst(0); } else if (returnType == void.class) { // do nothing } else { ca.iconst(0); } ca.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
/** * Adds two constructors to the class that call each other in order to bypass * the JVM class file verifier. * <p/> * This would result in a stack overflow if they were actually called, * however the proxy is directly created without calling the constructor */ private void addConstructorsForBeanWithPrivateConstructors(ClassFile proxyClassType) { ClassMethod ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE); CodeAttribute b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); ctor = proxyClassType.addMethod(AccessFlag.PUBLIC, INIT_METHOD_NAME, BytecodeUtils.VOID_CLASS_DESCRIPTOR, LJAVA_LANG_BYTE, LJAVA_LANG_BYTE); b = ctor.getCodeAttribute(); b.aload(0); b.aconstNull(); b.invokespecial(proxyClassType.getName(), INIT_METHOD_NAME, "(" + LJAVA_LANG_BYTE + ")" + BytecodeUtils.VOID_CLASS_DESCRIPTOR); b.returnInstruction(); }
DEFAULT_METHOD_RESOLVER.getDeclaredMethod(classMethod, methodInfo.getDeclaringClass(), method.getName(), methodInfo.getParameterTypes(), staticConstructor); b.aconstNull();
DEFAULT_METHOD_RESOLVER.getDeclaredMethod(classMethod, methodInfo.getDeclaringClass(), method.getName(), methodInfo.getParameterTypes(), staticConstructor); b.aconstNull();
DEFAULT_METHOD_RESOLVER.getDeclaredMethod(classMethod, methodInfo.getDeclaringClass(), method.getName(), methodInfo.getParameterTypes(), staticConstructor); b.aconstNull();
DEFAULT_METHOD_RESOLVER.getDeclaredMethod(classMethod, methodInfo.getDeclaringClass(), method.getName(), methodInfo.getParameterTypes(), staticConstructor); b.aconstNull();
DEFAULT_METHOD_RESOLVER.getDeclaredMethod(classMethod, methodInfo.getDeclaringClass(), method.getName(), methodInfo.getParameterTypes(), staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();
staticConstructor); b.aconstNull();