Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.AnnotationEntry


  /**
   * Retrieve an immutable version of this AnnotationGen
   */
  public AnnotationEntry getAnnotation()
  {
    AnnotationEntry a = new AnnotationEntry(typeIndex, cpool.getConstantPool(),
        isRuntimeVisible);
    for (ElementValuePairGen element : evs) {
      a.addElementNameValuePair(element.getElementNameValuePair());
    }
    return a;
  }
View Full Code Here


                }
            } else if (a instanceof Annotations) {
          Annotations runtimeAnnotations = (Annotations) a;
          AnnotationEntry[] aes = runtimeAnnotations.getAnnotationEntries();
          for (int k = 0; k < aes.length; k++) {
            AnnotationEntry element = aes[k];
            addAnnotationEntry(new AnnotationEntryGen(element, cp, false));
          }
            } else {
                addAttribute(a);
            }
View Full Code Here

      {
        RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr;
        AnnotationEntry[] annos = rva.getAnnotationEntries();
        for (int j = 0; j < annos.length; j++)
        {
          AnnotationEntry a = annos[j];
          annotationGenObjs.add(new AnnotationEntryGen(a,
              getConstantPool(), false));
        }
      }
      else
        if (attr instanceof RuntimeInvisibleAnnotations)
        {
          RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr;
          AnnotationEntry[] annos = ria.getAnnotationEntries();
          for (int j = 0; j < annos.length; j++)
          {
            AnnotationEntry a = annos[j];
            annotationGenObjs.add(new AnnotationEntryGen(a,
                getConstantPool(), false));
          }
        }
    }
View Full Code Here

                setValue(((ConstantValue) attrs[i]).getConstantValueIndex());
            } else if (attrs[i] instanceof Annotations) {
              Annotations runtimeAnnotations = (Annotations)attrs[i];
            AnnotationEntry[] annotationEntries = runtimeAnnotations.getAnnotationEntries();
            for (int j = 0; j < annotationEntries.length; j++) {
              AnnotationEntry element = annotationEntries[j];
              addAnnotationEntry(new AnnotationEntryGen(element,cp,false));
            }
            } else {
                addAttribute(attrs[i]);
            }
View Full Code Here

TOP

Related Classes of org.apache.bcel.classfile.AnnotationEntry

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.