Package org.aspectj.weaver

Examples of org.aspectj.weaver.AnnotationValue


            // is this just a marker annotation?
            throw new MissingImplementationException(
                "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation [" + annotation
                    + "]");
          } else {
            AnnotationValue av = generateElementValue(memberValuePair.value, methodBinding.returnType);
            AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), av);
            annotationAJ.addNameValuePair(anvp);
          }
        }
      }
    } else if (annotation instanceof SingleMemberAnnotation) {
      // this is a single member annotation (one member value)
      SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) annotation;
      MethodBinding methodBinding = singleMemberAnnotation.memberValuePairs()[0].binding;
      if (methodBinding == null) {
        throw new MissingImplementationException(
            "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation [" + annotation + "]");
      } else {
        AnnotationValue av = generateElementValue(singleMemberAnnotation.memberValue, methodBinding.returnType);
        annotationAJ.addNameValuePair(new AnnotationNameValuePair(new String(
            singleMemberAnnotation.memberValuePairs()[0].name), av));
      }
    } else if (annotation instanceof MarkerAnnotation) {
      return;
View Full Code Here


              + "]");
    } else {
      if (memberValuePairReturnType.isArrayType() && !defaultValueBinding.isArrayType()) {
        if (constant != null && constant != Constant.NotAConstant) {
          // Testcase for this clause is MultiProjectIncrementalTests.testAnnotations_pr262154()
          AnnotationValue av = EclipseAnnotationConvertor.generateElementValueForConstantExpression(defaultValue,
              defaultValueBinding);
          return new ArrayAnnotationValue(new AnnotationValue[] { av });
        } else {
          AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding);
          return new ArrayAnnotationValue(new AnnotationValue[] { av });
        }
      } else {
        if (constant != null && constant != Constant.NotAConstant) {
          AnnotationValue av = EclipseAnnotationConvertor.generateElementValueForConstantExpression(defaultValue,
              defaultValueBinding);
          if (av == null) {
            throw new MissingImplementationException(
                "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["
                    + defaultValue + "]");
          }
          return av;
          // generateElementValue(attributeOffset, defaultValue,
          // constant, memberValuePairReturnType.leafComponentType());
        } else {
          AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding);
          return av;
        }
      }
    }
  }
View Full Code Here

              "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["
                  + defaultValue + "]");
        }
        if (fieldBinding != null) {
          String sig = new String(fieldBinding.type.signature());
          AnnotationValue enumValue = new EnumAnnotationValue(sig, new String(fieldBinding.name));
          return enumValue;
        }
        throw new MissingImplementationException(
            "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value [" + defaultValue
                + "]");
View Full Code Here

            // is this just a marker annotation?
            throw new MissingImplementationException(
                "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation [" + annotation
                    + "]");
          } else {
            AnnotationValue av = generateElementValue(memberValuePair.value, methodBinding.returnType);
            AnnotationNameValuePair anvp = new AnnotationNameValuePair(new String(memberValuePair.name), av);
            annotationAJ.addNameValuePair(anvp);
          }
        }
      } else {
        throw new MissingImplementationException(
            "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation [" + annotation + "]");
      }
    } else if (annotation instanceof SingleMemberAnnotation) {
      // this is a single member annotation (one member value)
      SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) annotation;
      MethodBinding methodBinding = singleMemberAnnotation.memberValuePairs()[0].binding;
      if (methodBinding == null) {
        throw new MissingImplementationException(
            "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation [" + annotation + "]");
      } else {
        AnnotationValue av = generateElementValue(singleMemberAnnotation.memberValue, methodBinding.returnType);
        annotationAJ.addNameValuePair(new AnnotationNameValuePair(new String(
            singleMemberAnnotation.memberValuePairs()[0].name), av));
      }
    } else if (annotation instanceof MarkerAnnotation) {
      MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
View Full Code Here

              "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["
                  + defaultValue + "]");
          // generateElementValue(attributeOffset, defaultValue,
          // constant, memberValuePairReturnType.leafComponentType());
        } else {
          AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding);
          return new ArrayAnnotationValue(new AnnotationValue[] { av });
        }
      } else {
        if (constant != null && constant != Constant.NotAConstant) {
          if (constant instanceof IntConstant || constant instanceof BooleanConstant) {
            AnnotationValue av = generateElementValueForConstantExpression(defaultValue, defaultValueBinding);
            return av;
          }
          throw new MissingImplementationException(
              "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["
                  + defaultValue + "]");
          // generateElementValue(attributeOffset, defaultValue,
          // constant, memberValuePairReturnType.leafComponentType());
        } else {
          AnnotationValue av = generateElementValueForNonConstantExpression(defaultValue, defaultValueBinding);
          return av;
        }
      }
    }
  }
View Full Code Here

              "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value ["
                  + defaultValue + "]");
        }
        if (fieldBinding != null) {
          String sig = new String(fieldBinding.type.signature());
          AnnotationValue enumValue = new EnumAnnotationValue(sig, new String(fieldBinding.name));
          return enumValue;
        }
        throw new MissingImplementationException(
            "Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value [" + defaultValue
                + "]");
View Full Code Here

TOP

Related Classes of org.aspectj.weaver.AnnotationValue

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.