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

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


    }
    final int typeIndex = this.constantPool.literalIndex(annotationTypeBinding.signature());
    this.contents[this.contentsOffset++] = (byte) (typeIndex >> 8);
    this.contents[this.contentsOffset++] = (byte) typeIndex;
    if (annotation instanceof NormalAnnotation) {
      NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
      MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
      if (memberValuePairs != null) {
        final int memberValuePairsLength = memberValuePairs.length;
        this.contents[this.contentsOffset++] = (byte) (memberValuePairsLength >> 8);
        this.contents[this.contentsOffset++] = (byte) memberValuePairsLength;
View Full Code Here


    }
    final int typeIndex = this.constantPool.literalIndex(annotationTypeBinding.signature());
    this.contents[this.contentsOffset++] = (byte) (typeIndex >> 8);
    this.contents[this.contentsOffset++] = (byte) typeIndex;
    if (annotation instanceof NormalAnnotation) {
      NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
      MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
      int memberValuePairOffset = this.contentsOffset;
      if (memberValuePairs != null) {
        final int memberValuePairsLength = memberValuePairs.length;
        this.contents[this.contentsOffset++] = (byte) (memberValuePairsLength >> 8);
View Full Code Here

    }
    final int typeIndex = this.constantPool.literalIndex(annotationTypeBinding.signature());
    this.contents[this.contentsOffset++] = (byte) (typeIndex >> 8);
    this.contents[this.contentsOffset++] = (byte) typeIndex;
    if (annotation instanceof NormalAnnotation) {
      NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
      MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
      if (memberValuePairs != null) {
        final int memberValuePairsLength = memberValuePairs.length;
        this.contents[this.contentsOffset++] = (byte) (memberValuePairsLength >> 8);
        this.contents[this.contentsOffset++] = (byte) memberValuePairsLength;
View Full Code Here

    }
    final int typeIndex = this.constantPool.literalIndex(annotationTypeBinding.signature());
    this.contents[this.contentsOffset++] = (byte) (typeIndex >> 8);
    this.contents[this.contentsOffset++] = (byte) typeIndex;
    if (annotation instanceof NormalAnnotation) {
      NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
      MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
      if (memberValuePairs != null) {
        final int memberValuePairsLength = memberValuePairs.length;
        this.contents[this.contentsOffset++] = (byte) (memberValuePairsLength >> 8);
        this.contents[this.contentsOffset++] = (byte) memberValuePairsLength;
View Full Code Here

    }
    final int typeIndex = this.constantPool.literalIndex(annotationTypeBinding.signature());
    this.contents[this.contentsOffset++] = (byte) (typeIndex >> 8);
    this.contents[this.contentsOffset++] = (byte) typeIndex;
    if (annotation instanceof NormalAnnotation) {
      NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
      MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
      if (memberValuePairs != null) {
        final int memberValuePairsLength = memberValuePairs.length;
        this.contents[this.contentsOffset++] = (byte) (memberValuePairsLength >> 8);
        this.contents[this.contentsOffset++] = (byte) memberValuePairsLength;
View Full Code Here

  this.variablesCounter[this.nestedType] = 0;
}
protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
  // NormalTypeAnnotation ::= TypeAnnotationName '(' MemberValuePairsopt ')'
  // NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')'
  NormalAnnotation normalAnnotation = null;

  int oldIndex = this.identifierPtr;

  TypeReference typeReference = getAnnotationType();
  normalAnnotation = new NormalAnnotation(typeReference, this.intStack[this.intPtr--]);
  int length;
  if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
    System.arraycopy(
      this.astStack,
      (this.astPtr -= length) + 1,
View Full Code Here

                        ? ((Annotation)lastMemberValuePair.value).declarationSourceEnd
                        : lastMemberValuePair.value.sourceEnd
                    : lastMemberValuePair.sourceEnd;
              }

              NormalAnnotation normalAnnotation = new NormalAnnotation(typeReference, this.sourceStart);
              normalAnnotation.memberValuePairs = memberValuePairs;
              normalAnnotation.declarationSourceEnd = annotationEnd;
              normalAnnotation.bits |= ASTNode.IsRecovered;

              annot = normalAnnotation;

              needUpdateRParenPos = true;
            }
          }


          break;
        case SINGLE_MEMBER:
          if (parser.expressionPtr > -1) {
            Expression memberValue = parser.expressionStack[parser.expressionPtr--];

            SingleMemberAnnotation singleMemberAnnotation = new SingleMemberAnnotation(typeReference, this.sourceStart);
            singleMemberAnnotation.memberValue = memberValue;
            singleMemberAnnotation.declarationSourceEnd = memberValue.sourceEnd;
            singleMemberAnnotation.bits |= ASTNode.IsRecovered;

            annot = singleMemberAnnotation;

            needUpdateRParenPos = true;
          }
          break;
      }

      if (!needUpdateRParenPos) {
        if (pendingMemberValueName != null) {
          NormalAnnotation normalAnnotation = new NormalAnnotation(typeReference, this.sourceStart);
          normalAnnotation.memberValuePairs = new MemberValuePair[]{pendingMemberValueName};
          normalAnnotation.declarationSourceEnd = pendingMemberValueName.value.sourceEnd;
          normalAnnotation.bits |= ASTNode.IsRecovered;

          annot = normalAnnotation;
View Full Code Here

  if ((index = this.indexOfAssistIdentifier()) < 0) {
    super.consumeNormalAnnotation(isTypeAnnotation);
    return;
  }

  NormalAnnotation normalAnnotation = null;
  int length = this.identifierLengthStack[this.identifierLengthPtr];
  TypeReference typeReference;

  /* retrieve identifiers subset and whole positions, the assist node positions
    should include the entire replaced source. */

  char[][] subset = identifierSubSet(index);
  this.identifierLengthPtr--;
  this.identifierPtr -= length;
  long[] positions = new long[length];
  System.arraycopy(
    this.identifierPositionStack,
    this.identifierPtr + 1,
    positions,
    0,
    length);

  /* build specific assist on type reference */

  if (index == 0) {
    /* assist inside first identifier */
    typeReference = createSingleAssistTypeReference(
            assistIdentifier(),
            positions[0]);
  } else {
    /* assist inside subsequent identifier */
    typeReference =  createQualifiedAssistTypeReference(
            subset,
            assistIdentifier(),
            positions);
  }
  this.assistNode = typeReference;
  this.lastCheckPoint = typeReference.sourceEnd + 1;

  normalAnnotation = new NormalAnnotation(typeReference, this.intStack[this.intPtr--]);
  if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
    System.arraycopy(
      this.astStack,
      (this.astPtr -= length) + 1,
      normalAnnotation.memberValuePairs = new MemberValuePair[length],
View Full Code Here

TOP

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

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.