Package org.deuce.objectweb.asm

Examples of org.deuce.objectweb.asm.AnnotationVisitor


    public AnnotationVisitor visitAnnotation(
        final String desc,
        final boolean visible)
    {
        AnnotationVisitor av = super.visitAnnotation(desc, visible);
        if (fv != null) {
            ((TraceAnnotationVisitor) av).av = fv.visitAnnotation(desc, visible);
        }
        return av;
    }


    public AnnotationVisitor visitAnnotation(
        final String desc,
        final boolean visible)
    {
        text.add("\n");
        AnnotationVisitor tav = super.visitAnnotation(desc, visible);
        if (cv != null) {
            ((TraceAnnotationVisitor) tav).av = cv.visitAnnotation(desc,
                    visible);
        }
        return tav;

    public AnnotationVisitor visitAnnotation(
        final String desc,
        final boolean visible)
    {
        AnnotationVisitor av = super.visitAnnotation(desc, visible);
        if (mv != null) {
            ((TraceAnnotationVisitor) av).av = mv.visitAnnotation(desc, visible);
        }
        return av;
    }

                av.visitEnum(name, typeconst[0], typeconst[1]);
            } else if (value instanceof AnnotationNode) {
                AnnotationNode an = (AnnotationNode) value;
                an.accept(av.visitAnnotation(name, an.desc));
            } else if (value instanceof List) {
                AnnotationVisitor v = av.visitArray(name);
                List array = (List) value;
                for (int j = 0; j < array.size(); ++j) {
                    accept(v, null, array.get(j));
                }
                v.visitEnd();
            } else {
                av.visit(name, value);
            }
        }
    }

    for (ClassVisitor cv : cvs)
      cv.visit(version, access, name, signature, superName, interfaces);
  }

  public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
    AnnotationVisitor t = null;
    for (ClassVisitor cv : cvs)
      t = cv.visitAnnotation(desc, visible);
    return t;
  }

  }
 

  @Override
  public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
    final AnnotationVisitor visitAnnotation = super.visitAnnotation(desc, visible);
    if( AtomicMethod.ATOMIC_DESCRIPTOR.equals(desc)){
      return new AnnotationVisitor(){
        public void visit(String name, Object value) {
          if( name.equals("retries"))
            AtomicMethod.this.retries = (Integer)value;
         
          visitAnnotation.visit(name, value);
        }
        public AnnotationVisitor visitAnnotation(String name, String desc) {
          return visitAnnotation.visitAnnotation(name, desc);
        }
        public AnnotationVisitor visitArray(String name) {
          return visitAnnotation.visitArray(name);
        }
        public void visitEnd() {
          visitAnnotation.visitEnd();       
        }
        public void visitEnum(String name, String desc, String value) {
          visitAnnotation.visitEnum(name, desc, value);
        }
      };
    }
    return visitAnnotation;
  }

     */
    public void accept(final MethodVisitor mv) {
        // visits the method attributes
        int i, j, n;
        if (annotationDefault != null) {
            AnnotationVisitor av = mv.visitAnnotationDefault();
            AnnotationNode.accept(av, null, annotationDefault);
            if (av != null) {
                av.visitEnd();
            }
        }
        n = visibleAnnotations == null ? 0 : visibleAnnotations.size();
        for (i = 0; i < n; ++i) {
            AnnotationNode an = (AnnotationNode) visibleAnnotations.get(i);

TOP

Related Classes of org.deuce.objectweb.asm.AnnotationVisitor

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.