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

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


        List<NameValuePair> vals = ((BcelAnnotation) anns[i]).getBcelAnnotation().getValues();
        if (vals == null || vals.isEmpty()) { // (1)
          suppressedWarnings.addAll(lint.allKinds());
        } else { // (2)
          // We know the value is an array value
          ArrayElementValue array = (ArrayElementValue) (vals.get(0)).getValue();
          ElementValue[] values = array.getElementValuesArray();
          for (int j = 0; j < values.length; j++) {
            // We know values in the array are strings
            SimpleElementValue value = (SimpleElementValue) values[j];
            Lint.Kind lintKind = lint.getLintKind(value.getValueString());
            if (lintKind != null) {
View Full Code Here


    NameValuePair interfaceListSpecified = getAnnotationElement(declareMixinAnnotation, "interfaces");

    List<TypePattern> newParents = new ArrayList<TypePattern>(1);
    List<ResolvedType> newInterfaceTypes = new ArrayList<ResolvedType>(1);
    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
View Full Code Here

        List<NameValuePair> vals = ((BcelAnnotation) anns[i]).getBcelAnnotation().getValues();
        if (vals == null || vals.isEmpty()) { // (1)
          suppressedWarnings.addAll(lint.allKinds());
        } else { // (2)
          // We know the value is an array value
          ArrayElementValue array = (ArrayElementValue) (vals.get(0)).getValue();
          ElementValue[] values = array.getElementValuesArray();
          for (int j = 0; j < values.length; j++) {
            // We know values in the array are strings
            SimpleElementValue value = (SimpleElementValue) values[j];
            Lint.Kind lintKind = lint.getLintKind(value.getValueString());
            if (lintKind != null) {
View Full Code Here

    if (!type.equals(UnresolvedType.AT_TARGET)) {
      return Collections.emptySet();
    }
    List<NameValuePair> values = bcelAnnotation.getValues();
    NameValuePair envp = values.get(0);
    ArrayElementValue aev = (ArrayElementValue) envp.getValue();
    ElementValue[] evs = aev.getElementValuesArray();
    Set<String> targets = new HashSet<String>();
    for (int i = 0; i < evs.length; i++) {
      EnumElementValue ev = (EnumElementValue) evs[i];
      targets.add(ev.getEnumValueString());
    }
View Full Code Here

    NameValuePair interfaceListSpecified = getAnnotationElement(declareMixinAnnotation, "interfaces");

    List<TypePattern> newParents = new ArrayList<TypePattern>(1);
    List<ResolvedType> newInterfaceTypes = new ArrayList<ResolvedType>(1);
    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
View Full Code Here

    NameValuePair interfaceListSpecified = getAnnotationElement(declareMixinAnnotation, "interfaces");

    List<TypePattern> newParents = new ArrayList<TypePattern>(1);
    List<ResolvedType> newInterfaceTypes = new ArrayList<ResolvedType>(1);
    if (interfaceListSpecified != null) {
      ArrayElementValue arrayOfInterfaceTypes = (ArrayElementValue) interfaceListSpecified.getValue();
      int numberOfTypes = arrayOfInterfaceTypes.getElementValuesArraySize();
      ElementValue[] theTypes = arrayOfInterfaceTypes.getElementValuesArray();
      for (int i = 0; i < numberOfTypes; i++) {
        ClassElementValue interfaceType = (ClassElementValue) theTypes[i];
        // Check: needs to be resolvable
        // TODO crappy replace required
        ResolvedType ajInterfaceType = UnresolvedType.forSignature(interfaceType.getClassString().replace("/", "."))
View Full Code Here

    if (!type.equals(UnresolvedType.AT_TARGET)) {
      return Collections.emptySet();
    }
    List<NameValuePair> values = bcelAnnotation.getValues();
    NameValuePair envp = values.get(0);
    ArrayElementValue aev = (ArrayElementValue) envp.getValue();
    ElementValue[] evs = aev.getElementValuesArray();
    Set<String> targets = new HashSet<String>();
    for (int i = 0; i < evs.length; i++) {
      EnumElementValue ev = (EnumElementValue) evs[i];
      targets.add(ev.getEnumValueString());
    }
View Full Code Here

      atTargetAnnotation = retrieveAnnotationOnAnnotation(UnresolvedType.AT_TARGET);
      if (atTargetAnnotation != null) {
        supportedTargets = new HashSet();
        List values = atTargetAnnotation.getBcelAnnotation().getValues();
          ElementNameValuePair envp = (ElementNameValuePair)values.get(0);
          ArrayElementValue aev = (ArrayElementValue)envp.getValue();
          ElementValue[] evs = aev.getElementValuesArray();
          for (int i = 0; i < evs.length; i++) {
          EnumElementValue ev = (EnumElementValue)evs[i];
          supportedTargets.add(ev.getEnumValueString());
        }
      }
View Full Code Here

            List vals = anns[i].getBcelAnnotation().getValues();
            if (vals == null || vals.size()==0) { // (1)
                suppressed = true;
            } else { // (2)
              // We know the value is an array value
              ArrayElementValue array = (ArrayElementValue)((ElementNameValuePair)vals.get(0)).getValue();
              ElementValue[] values = array.getElementValuesArray();
              for (int j = 0; j < values.length; j++) {
                // We know values in the array are strings
          SimpleElementValue value = (SimpleElementValue)values[j];
          if (value.getValueString().equals(lintkey)) {
            suppressed = true;
View Full Code Here

            List vals = anns[i].getBcelAnnotation().getValues();
            if (vals == null || vals.size()==0) { // (1)
               suppressedWarnings.addAll(lint.allKinds());
            } else { // (2)
              // We know the value is an array value
              ArrayElementValue array = (ArrayElementValue)((ElementNameValuePair)vals.get(0)).getValue();
              ElementValue[] values = array.getElementValuesArray();
              for (int j = 0; j < values.length; j++) {
                // We know values in the array are strings
          SimpleElementValue value = (SimpleElementValue)values[j];
          Lint.Kind lintKind = lint.getLintKind(value.getValueString());
          if (lintKind != null) suppressedWarnings.add(lintKind);
View Full Code Here

TOP

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

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.