Package org.ow2.asm

Examples of org.ow2.asm.ClassVisitor.visitEnd()


        // invokeinterface
        mv.visitVarInsn(ALOAD, 0);
        mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I");
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void monitorInsns(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
                "monitorInsns",
View Full Code Here


        mv.visitInsn(MONITORENTER);
        mv.visitVarInsn(ALOAD, 0);
        mv.visitInsn(MONITOREXIT);
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void varargMethod(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC + ACC_VARARGS + ACC_STRICT,
                "varargMethod",
View Full Code Here

                "([Ljava/lang/Object;)V^TF;",
                new String[] { "java/lang/Exception" });
        mv.visitCode();
        mv.visitInsn(RETURN);
        mv.visitMaxs(0, 0);
        mv.visitEnd();
    }

    private void bridgeMethod(final ClassWriter cw) {
        MethodVisitor mv = cw.visitMethod(ACC_PUBLIC,
                "get",
View Full Code Here

        // Replay
        replayInner(annotationVisitor);

        // End of visit
        annotationVisitor.visitEnd();
        getLogger().debug("annotationVisitor.visitEnd();");
    }


}
View Full Code Here

        // Replay
        replayInner(annotationVisitor);

        // End of visit
        annotationVisitor.visitEnd();
        this.logger.debug("annotationVisitor.visitEnd();");
    }

    /**
     * Replay the value stored on the given annotation visitor.
View Full Code Here

        // Replay
        replayInner(av);

        // End of visit
        av.visitEnd();
        this.logger.debug("annotationVisitor.visitEnd()");
    }

    /**
     * Common stuff shared by annotationvisitor/methodvisitor replay code.
View Full Code Here

        // Replay
        replayInner(av);

        // End of visit
        av.visitEnd();
        getLogger().debug("av.visitEnd();");
    }
}
View Full Code Here

     */
    public static void addAnnotationsOnGeneratedMethod(final MethodVisitor methodVisitor) {
        // This method shouldn't be included as a JAX-WS WebMethod.
        AnnotationVisitor annotationVisitor = methodVisitor.visitAnnotation("Ljavax/jws/WebMethod;", true);
        annotationVisitor.visit("exclude", Boolean.TRUE);
        annotationVisitor.visitEnd();
    }


}
View Full Code Here

        mv.visitLdcInsn(helloWorldString);
        mv.visitInsn(ARETURN);
        mv.visitMaxs(1, 1);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
    }

}
View Full Code Here

        Type type = Type.getType(className);

        // Add the fieldName attribute
        // private CLASSNAME fieldName = null;
        FieldVisitor fv = cv.visitField(ACC_PRIVATE, fieldName, className, null, null);
        fv.visitEnd();

        // build getterName
        String appendName = fieldName.toUpperCase().charAt(0) + fieldName.substring(1);
        String getterName = "get" + appendName;
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.