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

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


}
protected void consumeFormalParameter(boolean isVarArgs) {
  if (this.indexOfAssistIdentifier() < 0) {
    super.consumeFormalParameter(isVarArgs);
    if((!this.diet || this.dietInt != 0) && this.astPtr > -1) {
      Argument argument = (Argument) this.astStack[this.astPtr];
      if(argument.type == this.assistNode) {
        this.isOrphanCompletionNode = true;
        this.restartRecovery  = true// force to restart in recovery mode
        this.lastIgnoredToken = -1;
      }
    }
  } else {
    boolean isReceiver = this.intStack[this.intPtr--] == 0;
      if (isReceiver) {
        this.expressionPtr--;
        this.expressionLengthPtr --;
      }
    this.identifierLengthPtr--;
    char[] identifierName = this.identifierStack[this.identifierPtr];
    long namePositions = this.identifierPositionStack[this.identifierPtr--];
    int extendedDimensions = this.intStack[this.intPtr--];
    Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
    Annotation [] varArgsAnnotations = null;
    int length;
    int endOfEllipsis = 0;
    if (isVarArgs) {
      endOfEllipsis = this.intStack[this.intPtr--];
      if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
        System.arraycopy(
          this.typeAnnotationStack,
          (this.typeAnnotationPtr -= length) + 1,
          varArgsAnnotations = new Annotation[length],
          0,
          length);
      }
    }
    int firstDimensions = this.intStack[this.intPtr--];
    TypeReference type = getTypeReference(firstDimensions);

    if (isVarArgs || extendedDimensions != 0) {
      if (isVarArgs) {
        type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true)
      }
      if (extendedDimensions != 0) { // combination illegal.
        type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
      }
      type.sourceEnd = type.isParameterizedTypeReference() ? this.endStatementPosition : this.endPosition;
    }
    if (isVarArgs) {
      if (extendedDimensions == 0) {
        type.sourceEnd = endOfEllipsis;
      }
      type.bits |= ASTNode.IsVarArgs; // set isVarArgs
    }
    int modifierPositions = this.intStack[this.intPtr--];
    this.intPtr--;
    Argument arg =
      new SelectionOnArgumentName(
        identifierName,
        namePositions,
        type,
        this.intStack[this.intPtr + 1] & ~ClassFileConstants.AccDeprecated); // modifiers
View Full Code Here


 
  this.identifierLengthPtr--;
  char[] identifierName = this.identifierStack[this.identifierPtr];
  long namePositions = this.identifierPositionStack[this.identifierPtr--];

  Argument argument =
    new SelectionOnArgumentName(
      identifierName,
      namePositions,
      null, // elided type
      ClassFileConstants.AccDefault,
View Full Code Here

    if (this.declaringClass instanceof SourceTypeBinding) {
      SourceTypeBinding sourceType = (SourceTypeBinding) this.declaringClass;
      if (sourceType.scope != null) {
        AbstractMethodDeclaration methodDecl = sourceType.scope.referenceType().declarationOf(this);
        for (int i = 0; i < length; i++) {
          Argument argument = methodDecl.arguments[i];
          if (argument.annotations != null) {
            ASTNode.resolveAnnotations(methodDecl.scope, argument.annotations, argument.binding);
            allParameterAnnotations[i] = argument.binding.getAnnotations();
          } else {
            allParameterAnnotations[i] = Binding.NO_ANNOTATIONS;
View Full Code Here

  private boolean resolveParameters(TreeLogger logger, JAbstractMethod method,
      Argument[] jparams) {
    if (jparams != null) {
      for (int i = 0; i < jparams.length; i++) {
        Argument jparam = jparams[i];
        if (!resolveParameter(logger, method, jparam)) {
          return false;
        }
      }
    }
View Full Code Here

TOP

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

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.