Package org.aspectj.apache.bcel.classfile.annotation

Examples of org.aspectj.apache.bcel.classfile.annotation.RuntimeParameterAnnotations


   */
  private void ensureExistingParameterAnnotationsUnpacked() {
    if (haveUnpackedParameterAnnotations) return;
    // Find attributes that contain parameter annotation data
    Attribute[] attrs = getAttributes();
    RuntimeParameterAnnotations paramAnnVisAttr = null;
    RuntimeParameterAnnotations paramAnnInvisAttr=null;
    List accumulatedAnnotations = new ArrayList();
    for (int i = 0; i < attrs.length; i++) {
    Attribute attribute = attrs[i];
    if (attribute instanceof RuntimeParameterAnnotations) { 
     
      // Initialize param_annotations
      if (!hasParameterAnnotations) {
        param_annotations = new List[arg_types.length];
        for (int j=0;j<arg_types.length;j++) param_annotations[j]=new ArrayList();
      }
     
      hasParameterAnnotations = true;
      RuntimeParameterAnnotations rpa = (RuntimeParameterAnnotations)attribute;
      if (rpa.areVisible()) paramAnnVisAttr = rpa;
      else                  paramAnnInvisAttr=rpa;
      for (int j=0; j<arg_types.length; j++) {
        // This returns Annotation[] ...
        Annotation[] immutableArray = rpa.getAnnotationsOnParameter(j);
        // ... which needs transforming into an AnnotationGen[] ...
        List mutable = makeMutableVersion(immutableArray);
        // ... then add these to any we already know about
        param_annotations[j].addAll(mutable);
      }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.classfile.annotation.RuntimeParameterAnnotations

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.