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

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


      unpackedParameterAnnotations = NO_PARAMETER_ANNOTATIONS;
      return;
    }

    RuntimeVisParamAnnos parameterAnnotationsVis = null;
    RuntimeInvisParamAnnos parameterAnnotationsInvis = null;

    // Find attributes that contain annotation data
    Attribute[] attrs = getAttributes();

    for (int i = 0; i < attrs.length; i++) {
      Attribute attribute = attrs[i];
      if (attribute instanceof RuntimeVisParamAnnos) {
        parameterAnnotationsVis = (RuntimeVisParamAnnos) attribute;
      } else if (attribute instanceof RuntimeInvisParamAnnos) {
        parameterAnnotationsInvis = (RuntimeInvisParamAnnos) attribute;
      }
    }

    boolean foundSome = false;
    // Build a list of annotation arrays, one per argument
    if (parameterAnnotationsInvis != null || parameterAnnotationsVis != null) {
      List<AnnotationGen[]> annotationsForEachParameter = new ArrayList<AnnotationGen[]>();
      AnnotationGen[] visibleOnes = null;
      AnnotationGen[] invisibleOnes = null;
      for (int i = 0; i < parameterCount; i++) {
        int count = 0;
        visibleOnes = new AnnotationGen[0];
        invisibleOnes = new AnnotationGen[0];
        if (parameterAnnotationsVis != null) {
          visibleOnes = parameterAnnotationsVis.getAnnotationsOnParameter(i);
          count += visibleOnes.length;
        }
        if (parameterAnnotationsInvis != null) {
          invisibleOnes = parameterAnnotationsInvis.getAnnotationsOnParameter(i);
          count += invisibleOnes.length;
        }

        AnnotationGen[] complete = AnnotationGen.NO_ANNOTATIONS;
        if (count != 0) {
View Full Code Here


    case Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS:
      return new RuntimeInvisAnnos(idx, len, file, cpool);
    case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS:
      return new RuntimeVisParamAnnos(idx, len, file, cpool);
    case Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS:
      return new RuntimeInvisParamAnnos(idx, len, file, cpool);
    case Constants.ATTR_ANNOTATION_DEFAULT:
      return new AnnotationDefault(idx, len, file, cpool);
    case Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE:
      return new LocalVariableTypeTable(idx, len, file, cpool);
    case Constants.ATTR_ENCLOSING_METHOD:
View Full Code Here

      if (totalVisCount > 0) {
        newAttributes.add(new RuntimeVisParamAnnos(rvaIndex, rvaData.length, rvaData, cp));
      }

      if (totalInvisCount > 0) {
        newAttributes.add(new RuntimeInvisParamAnnos(riaIndex, riaData.length, riaData, cp));
      }

      return newAttributes.toArray(new Attribute[] {});
    } catch (IOException e) {
      System.err.println("IOException whilst processing parameter annotations");
View Full Code Here

TOP

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

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.