Examples of visitCode()


Examples of org.apache.tapestry5.internal.plastic.asm.MethodVisitor.visitCode()

    public void visitEnd() {
        if (syntheticClassFields.isEmpty()) {
            if (hasClinitMethod) {
                MethodVisitor mv = cv.visitMethod(Opcodes.ACC_STATIC
                        | Opcodes.ACC_SYNTHETIC, "_clinit_", "()V", null, null);
                mv.visitCode();
                mv.visitInsn(Opcodes.RETURN);
                mv.visitMaxs(0, 0);
                mv.visitEnd();
            }
        } else {
View Full Code Here

Examples of org.apache.xbean.asm.MethodVisitor.visitCode()

     * calls the superclass (the bean implementation class)
     * default constructor.
     */
    private void createConstructor() {
        MethodVisitor mv = mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, beanClassName, "<init>", "()V");

        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
View Full Code Here

Examples of org.apache.xbean.asm4.MethodVisitor.visitCode()

    {
        String[] exceptionTypeNames = {Type.getType(ObjectStreamException.class).getInternalName()};
        MethodVisitor mv = cw.visitMethod(Modifier.PUBLIC, "writeReplace", "()Ljava/lang/Object;", null, exceptionTypeNames);

        // fill method body
        mv.visitCode();

        // load the contextual instance Provider
        mv.visitVarInsn(Opcodes.ALOAD, 0);
        mv.visitFieldInsn(Opcodes.GETFIELD, proxyClassFileName, FIELD_INSTANCE_PROVIDER, Type.getDescriptor(Provider.class));
View Full Code Here

Examples of org.apache.xbean.asm5.MethodVisitor.visitCode()

        } else if (Modifier.isProtected(modifiers)) {
            modifier = ACC_PROTECTED;
        }

        final MethodVisitor mv = cw.visitMethod(modifier, method.getName(), getMethodSignatureAsString(returnType, parameterTypes), null, null);
        mv.visitCode();

        // push try/catch block, to catch declared exceptions, and to catch java.lang.Throwable
        final Label l0 = new Label();
        final Label l1 = new Label();
        final Label l2 = new Label();
View Full Code Here

Examples of org.codehaus.jackson.org.objectweb.asm.MethodVisitor.visitCode()

        cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, generatedClass, null, superClass, null);
        cw.visitSource(srcName + ".java", null);

        // add default (no-arg) constructor:
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
        mv.visitCode();
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKESPECIAL, superClass, "<init>", "()V");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0); // don't care (real values: 1,1)
        mv.visitEnd();
View Full Code Here

Examples of org.deuce.objectweb.asm.MethodVisitor.visitCode()

      String signature, String[] exceptions) {
    Method newMethod = createNewMethod(name, desc);
    final int newAccess = access & ~Opcodes.ACC_NATIVE;
    MethodVisitor copyMethod =  super.visitMethod(newAccess | Opcodes.ACC_SYNTHETIC, name, newMethod.getDescriptor(),
        signature, exceptions);
    copyMethod.visitCode();
   
    // load the arguments before calling the original method
    final boolean isStatic = (access & ~Opcodes.ACC_STATIC) != 0;
    int place = 0; // place on the stack
    if(!isStatic){
View Full Code Here

Examples of org.drools.asm.MethodVisitor.visitCode()

                                 "<init>",
                                 Type.getMethodDescriptor( Type.VOID_TYPE,
                                                           new Type[]{} ),
                                 null,
                                 null );
            mv.visitCode();
            Label l0 = null;
            if ( this.debug ) {
                l0 = new Label();
                mv.visitLabel( l0 );
            }
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitCode()

        // public Class<?> containerClass() {
        //     return CONTAINER_TYPE.class;
        // }
        mv = cw.visitMethod(Opcodes.ACC_PROTECTED, "containerClass", "()Ljava/lang/Class;", "()Ljava/lang/Class<*>;", null);
        mv.visitCode();
        if(componentType.isPrimitive()) {
            mv.visitFieldInsn(Opcodes.GETSTATIC, getObjectType(componentType).getQualifiedName().replace(DOT_CHR, SLASH_CHR), "TYPE", "Ljava/lang/Class;");
        } else {
            if(containerClassNameSeperatedBySlash.contains(";")) {
                mv.visitLdcInsn(Type.getType(containerClassNameSeperatedBySlash));
View Full Code Here

Examples of org.eclipse.sisu.space.asm.MethodVisitor.visitCode()

            final ClassWriter cw = new ClassWriter( 0 );
            cw.visit( Opcodes.V1_6, Modifier.PUBLIC, proxyName, null, superName, null );
            final MethodVisitor mv = cw.visitMethod( Modifier.PUBLIC, "<init>", "()V", null, null );

            mv.visitCode();
            mv.visitVarInsn( Opcodes.ALOAD, 0 );
            mv.visitMethodInsn( Opcodes.INVOKESPECIAL, superName, "<init>", "()V", false );
            mv.visitInsn( Opcodes.RETURN );
            mv.visitMaxs( 1, 1 );
            mv.visitEnd();
View Full Code Here

Examples of org.glassfish.hk2.external.org.objectweb.asm.MethodVisitor.visitCode()

        if (!classOptimizer.class$) {
            MethodVisitor mv = classOptimizer.visitMethod(ACC_STATIC
                    | ACC_SYNTHETIC, "class$",
                    "(Ljava/lang/String;)Ljava/lang/Class;", null, null);
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2,
                    "java/lang/ClassNotFoundException");
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.