public byte[] createTokenizer(final String[] httpVerbs, String[] httpVersions, String[] standardHeaders) { final String className = existingClassName + CLASS_NAME_SUFFIX; final ClassFile file = new ClassFile(className, existingClassName); final ClassMethod ctor = file.addMethod(AccessFlag.PUBLIC, "<init>", "V", DescriptorUtils.parameterDescriptors(constructorDescriptor)); ctor.getCodeAttribute().aload(0); ctor.getCodeAttribute().loadMethodParameters(); ctor.getCodeAttribute().invokespecial(existingClassName, "<init>", constructorDescriptor); ctor.getCodeAttribute().returnInstruction(); final ClassMethod sctor = file.addMethod(AccessFlag.PUBLIC | AccessFlag.STATIC, "<clinit>", "V"); final AtomicInteger fieldCounter = new AtomicInteger(1); sctor.getCodeAttribute().invokestatic(existingClassName, "httpStrings", "()" + DescriptorUtils.makeDescriptor(Map.class)); sctor.getCodeAttribute().astore(CONSTRUCTOR_HTTP_STRING_MAP_VAR); createStateMachines(httpVerbs, httpVersions, standardHeaders, className, file, sctor, fieldCounter); sctor.getCodeAttribute().returnInstruction(); return file.toBytecode(); }
sm.checkPermission(permission); byte[] b = toBytecode(); java.lang.reflect.Method method; Object[] args;
sm.checkPermission(permission); byte[] b = toBytecode(); java.lang.reflect.Method method; Object[] args;
sm.checkPermission(permission); byte[] b = toBytecode(); java.lang.reflect.Method method; Object[] args;
sm.checkPermission(permission); byte[] b = toBytecode(); java.lang.reflect.Method method; Object[] args;
sm.checkPermission(permission); byte[] b = toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
byte[] b = ct.toBytecode(); java.lang.reflect.Method method; Object[] args;
/** * Delegates proxy creation via {@link ProxyServices} to the integrator. */ public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) { try { byte[] bytecode = ct.toBytecode(); Class<?> result; if (domain == null) { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length); } else { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain); } return result; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
/** * Delegates proxy creation via {@link ProxyServices} to the integrator. */ public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) { try { byte[] bytecode = ct.toBytecode(); Class<?> result; if (domain == null) { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length); } else { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain); } return result; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
/** * Delegates proxy creation via {@link ProxyServices} to the integrator. */ public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) { try { byte[] bytecode = ct.toBytecode(); Class<?> result; if (domain == null) { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length); } else { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain); } return result; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
/** * Delegates proxy creation via {@link ProxyServices} to the integrator. */ public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) { try { byte[] bytecode = ct.toBytecode(); Class<?> result; if (domain == null) { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length); } else { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain); } return result; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
/** * Delegates proxy creation via {@link ProxyServices} to the integrator. */ public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) { try { byte[] bytecode = ct.toBytecode(); Class<?> result; if (domain == null) { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length); } else { result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain); } return result; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } }
dumpToFile(proxyClassName, proxyClassType.toBytecode());
dumpToFile(proxyClassName, proxyClassType.toBytecode());
dumpToFile(proxyClassName, proxyClassType.toBytecode());