Package org.eclipse.jdt.internal.compiler.ast

Examples of org.eclipse.jdt.internal.compiler.ast.Annotation


        if (nullTagBits == 0L) {
          nullTagBits |= superNullTagBits;
        } else if (superNullTagBits != nullTagBits) {
          // not finding either bound or ann should be considered a compiler bug
          TypeReference bound = findBound(this.firstBound, parameter);
          Annotation ann = bound.findAnnotation(superNullTagBits);
          scope.problemReporter().contradictoryNullAnnotationsOnBounds(ann, nullTagBits);
          this.tagBits &= ~TagBits.AnnotationNullMASK;
        }
      }
    } 
    ReferenceBinding[] interfaces = this.superInterfaces;
    int length;
    if ((length = interfaces.length) != 0) {
      for (int i = length; --i >= 0;) {
        ReferenceBinding resolveType = interfaces[i];
        long superNullTagBits = NullAnnotationMatching.validNullTagBits(resolveType.tagBits);
        if (superNullTagBits != 0L) {
          if (nullTagBits == 0L) {
            nullTagBits |= superNullTagBits;
          } else if (superNullTagBits != nullTagBits) {
            // not finding either bound or ann should be considered a compiler bug
            TypeReference bound = findBound(this.firstBound, parameter);
            Annotation ann = bound.findAnnotation(superNullTagBits);
            scope.problemReporter().contradictoryNullAnnotationsOnBounds(ann, nullTagBits);
            this.tagBits &= ~TagBits.AnnotationNullMASK;
          }
        }
        interfaces[i] = resolveType;
View Full Code Here


  public void updateFromParserState() {
    Parser parser = parser();

    if (this.annotation == null && this.identifierPtr <= parser.identifierPtr) {
      Annotation annot = null;

      boolean needUpdateRParenPos = false;

      MemberValuePair pendingMemberValueName = null;
      if (this.hasPendingMemberValueName && this.identifierPtr < parser.identifierPtr) {
View Full Code Here

    addNewUnits(logger, units);
  }

  private Object createAnnotationInstance(TreeLogger logger,
      Expression expression) {
    Annotation annotation = (Annotation) expression;

    // Determine the annotation class
    TypeBinding resolvedType = annotation.resolvedType;
    Class<?> classLiteral = getClassLiteral(logger, resolvedType);
    if (classLiteral == null) {
      return null;
    }

    Class<? extends java.lang.annotation.Annotation> clazz = classLiteral.asSubclass(java.lang.annotation.Annotation.class);

    // Build the map of identifiers to values.
    Map<String, Object> identifierToValue = new HashMap<String, Object>();
    for (MemberValuePair mvp : annotation.memberValuePairs()) {
      // Method name
      String identifier = String.valueOf(mvp.name);

      // Value
      Expression expressionValue = mvp.value;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.ast.Annotation

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.