Package org.objectweb.asm

Examples of org.objectweb.asm.ClassWriter.visitEnd()


        clinitMethod.putstatic(pathName, "$runtimeCache", ci(RuntimeCache.class));
        clinitMethod.voidreturn();
        clinitMethod.end();
       
        // end class
        cw.visitEnd();
       
        // create the class
        byte[] bytes = cw.toByteArray();
        Class newClass;
        synchronized (classLoader) {
View Full Code Here


        clinitMethod.putstatic(pathName, "$runtimeCache", ci(RuntimeCache.class));
        clinitMethod.voidreturn();
        clinitMethod.end();

        // end class
        cw.visitEnd();

        // create the class
        byte[] bytes = cw.toByteArray();
        Class newClass;
        JRubyClassLoader loader;
View Full Code Here

                    methodsDone.add(meth.toString());
                }
            }
        }

        cw.visitEnd();

        return cw.toByteArray();
    }

    private String[] getNames(final Class[] interfaces) {
View Full Code Here

            createDoMethodInvokeMethod(method, cw, className, returnType, methodDescriptor);

            createIsValidMethodMethod(method, cw, className);

            cw.visitEnd();

            final byte[] bytes = cw.toByteArray();
            final FileOutputStream fileOutputStream = new FileOutputStream("target/classes/" + className + ".class");
            fileOutputStream.write(bytes);
            fileOutputStream.flush();
View Full Code Here

        for (Method method : interfaze.getMethods()) {
            if (!(method.getDeclaringClass() == Object.class)) {
                generateMethod(cw, interfaceName, className, method, consumes, produces);
            }
        }
        cw.visitEnd();

        return cw.toByteArray();
    }

    // public <ReturnType> method(<Type0> arg0, ..., <TypeN> argN) throws <ExpectionType0>, ..., <ExceptionTypeK>
View Full Code Here

            av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlSchema;", true);
            av0.visit("namespace", namespace);
            av0.visitEnd();

            cw.visitEnd();
   
            return cw.toByteArray();
        }
    }
   
View Full Code Here

        for (MessagePartInfo mpi : messageInfo.getMessageParts()) {
            generateMessagePart(cw, mpi, method, classFileName);
        }

        cw.visitEnd();

        Class<?> clz = loadClass(className, method.getDeclaringClass(), cw.toByteArray());
        wrapperPart.setTypeClass(clz);
        wrapperBeans.add(clz);
    }
View Full Code Here

        av0.visit("namespace", ns);
        av0.visitEnum("elementFormDefault",
                      getClassCode(XmlNsForm.class),
                      q ? "QUALIFIED" : "UNQUALIFIED");
        av0.visitEnd();
        cw.visitEnd();

        loadClass(className, clz, cw.toByteArray());
    }

    private void generateMessagePart(ClassWriter cw, MessagePartInfo mpi, Method method, String className) {
View Full Code Here

                mv.visitInsn(Opcodes.ARETURN);
                mv.visitLabel(new Label());
                mv.visitMaxs(1, 1);
                mv.visitEnd();

                cw.visitEnd();
               
                return super.loadClass(bean.getName() + "_Exception", bean, cw.toByteArray());
            }
            return cls;
        }
View Full Code Here

        for (MessagePartInfo mpi : messageInfo.getMessageParts()) {
            generateMessagePart(cw, mpi, method, classFileName);
        }

        cw.visitEnd();

        Class<?> clz = loadClass(className, method.getDeclaringClass(), cw.toByteArray());
        wrapperPart.setTypeClass(clz);
        wrapperBeans.add(clz);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.