Package org.objectweb.asm

Examples of org.objectweb.asm.MethodAdapter


    };
  }

  public MethodVisitor visitMethod(final int access, final String methodName,
      final String desc, final String signature, final String[] exceptions) {
    return new MethodAdapter(EMPTY_VISITOR) {

      Map<String,Annotation> ma = new HashMap<String,Annotation>();
      ArrayList<Map<String, Annotation>> pa = new ArrayList<Map<String, Annotation>>();

      public AnnotationVisitor visitAnnotationDefault() {
View Full Code Here


      return EMPTY_VISITOR;
    }

    public MethodVisitor visitMethod(final int access, final String methodName,
        final String desc, final String signature, final String[] exceptions) {
      return new MethodAdapter(EMPTY_VISITOR) {

        public AnnotationVisitor visitAnnotationDefault() {
          // remove leading ()
          String type = desc.substring(2);
View Full Code Here

      String signature,
      String[] exceptions) {
    // force "static boolean isDesignTime()" return "true"
    if ("isDesignTime".equals(name) && "()Z".equals(desc) && (access & ACC_STATIC) == ACC_STATIC) {
      MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
      return new MethodAdapter(mv) {
        @Override
        public void visitCode() {
          super.visitCode();
          mv.visitIntInsn(SIPUSH, 1);
          mv.visitInsn(IRETURN);
View Full Code Here

                      boolean suppressAuditing,
                      boolean debugAuditing,
                      boolean traceAuditing,
                      boolean injectRecorder) {

        this.mv = new MethodAdapter(mv);

        this.source = source;

        this.id = methodId;
View Full Code Here

    if ("<clinit>".equals(name)) {
      return super.visitMethod(arg, name, descriptor, signature, exceptions);
    }

    MethodVisitor mv = super.visitMethod(arg, name, descriptor, signature, exceptions);
    MethodAdapter ma = new ProfMethodAdapter(mv, mFileName, mClassName, name);
    return ma;
  }
View Full Code Here

                final MethodVisitor passthroughVisitor = super.visitMethod(access,
                                                                           name,
                                                                           desc,
                                                                           signature,
                                                                           exceptions);
                return new MethodAdapter(passthroughVisitor) {

                    @Override
                    public void visitCode() {
                        super.visitCode();
                        generateAddBuilder(passthroughVisitor);
View Full Code Here

            ClassReader cr = new ClassReader(bytes);
            ClassWriter cw = new ClassWriter(false, true);
            cr.accept(
                    new ClassAdapter(cw) {
                        public MethodVisitor visitMethod(int access, final String name, String desc, String signature, String[] exceptions) {
                            return new MethodAdapter(super.visitMethod(access, name, desc, signature, exceptions)) {
                                public AnnotationVisitor visitAnnotationDefault() {
                                    return new DefaultAnnotationBuilderVisitor(newDefaults, name, loader);
                                }
                            };
                        }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.MethodAdapter

Copyright © 2018 www.massapicom. 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.