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

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


    if (parameterCount == 0) {
      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;
View Full Code Here


    case Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS:
      return new RuntimeVisAnnos(idx, len, file, cpool);
    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:
View Full Code Here

      }

      List<RuntimeParamAnnos> newAttributes = new ArrayList<RuntimeParamAnnos>();

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

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

TOP

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

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.