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

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


  this.astPtr -= length;
  AbstractMethodDeclaration md = (AbstractMethodDeclaration) this.astStack[this.astPtr];
  md.sourceEnd =   this.rParenPos;
  //arguments
  if (length != 0) {
    Argument arg = (Argument) this.astStack[this.astPtr + 1];
    if (arg.isReceiver()) {
      md.receiver = (Receiver) arg;
      if (length > 1) {
        System.arraycopy(
          this.astStack,
          this.astPtr + 2,
View Full Code Here


      arguments = new Argument[length],
      0,
      length);
  }
  for (int i = 0; i < length; i++) {
    final Argument argument = arguments[i];
    if (argument.isReceiver()) {
      problemReporter().illegalThis(argument);
    }
    if (argument.name.length == 1 && argument.name[0] == '_')
      problemReporter().illegalUseOfUnderscoreAsAnIdentifier(argument.sourceStart, argument.sourceEnd, true); // true == lambdaParameter
  }
View Full Code Here

protected Argument typeElidedArgument() {
  this.identifierLengthPtr--;
  char[] identifierName = this.identifierStack[this.identifierPtr];
  long namePositions = this.identifierPositionStack[this.identifierPtr--];

  Argument arg =
    new Argument(
      identifierName,
      namePositions,
      null, // elided type
      ClassFileConstants.AccDefault,
      true);
View Full Code Here

    // pop annotations
    annotationLength = this.expressionLengthStack[this.expressionLengthPtr--];
    this.expressionPtr -= annotationLength;
  }

  Argument arg = typeElidedArgument();
  if (modifier != ClassFileConstants.AccDefault || annotationLength != 0) {
    problemReporter().illegalModifiersForElidedType(arg);
    arg.declarationSourceStart = modifiersStart;
  }
  if (!parenthesized) { // in the absence of '(' and ')', record positions.
View Full Code Here

        // to compute bodyStart, and thus used to set next checkpoint.
        int count;
        for (count = 0; count < argLength; count++){
          ASTNode aNode = parser.astStack[argStart+count];
          if(aNode instanceof Argument) {
            Argument argument = (Argument)aNode;
            /* cannot be an argument if non final */
            char[][] argTypeName = argument.type.getTypeName();
            if ((argument.modifiers & ~ClassFileConstants.AccFinal) != 0
              || (argTypeName.length == 1
                && CharOperation.equals(argTypeName[0], TypeBinding.VOID.sourceName()))){
View Full Code Here

        Argument[] arguments = methodDeclaration.arguments;
        String[] parameterSignatures;
        if (arguments != null) {
          parameterSignatures = new String[arguments.length];
          for (int i = 0; i < arguments.length; i++) {
            Argument argument = arguments[i];
            TypeReference typeReference = argument.type;
            int arrayDim = typeReference.dimensions();

            String typeSig =
              Signature.createTypeSignature(
View Full Code Here

    Argument[] args = method.arguments;
    if (args != null) {
      int length = args.length;
      String[] signatures = new String[length];
      for (int i = 0; i < args.length; i++) {
        Argument arg = args[i];
        signatures[i] = typeSignature(arg.type);
      }
      return signatures;
    }
    return CharOperation.NO_STRINGS;
View Full Code Here

  if (arguments != null) {
    int size = arguments.length;
    method.parameters = Binding.NO_PARAMETERS;
    TypeBinding[] newParameters = new TypeBinding[size];
    for (int i = 0; i < size; i++) {
      Argument arg = arguments[i];
      if (arg.annotations != null) {
        method.tagBits |= TagBits.HasParameterAnnotations;
      }
      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=322817
      boolean deferRawTypeCheck = !reportUnavoidableGenericTypeProblems && !method.isConstructor() && (arg.type.bits & ASTNode.IgnoreRawTypeCheck) == 0;
View Full Code Here

    int argumentLength = arguments.length;
    char[][] argumentTypes = new char[argumentLength][];
    char[][] argumentNames = new char[argumentLength][];
    int argumentCount = 0;
    next : for (int i = 0; i < argumentLength; i++) {
      Argument argument = arguments[i];

      if (argument instanceof CompletionOnArgumentName && argument.name.length == 0) continue next;

      argumentTypes[argumentCount] = CharOperation.concatWith(argument.type.getParameterizedTypeName(), '.');
      argumentNames[argumentCount++] = argument.name;
View Full Code Here

}
protected void consumeCatchFormalParameter() {
  if (this.indexOfAssistIdentifier() < 0) {
    super.consumeCatchFormalParameter();
    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 {
    this.identifierLengthPtr--;
    char[] identifierName = this.identifierStack[this.identifierPtr];
    long namePositions = this.identifierPositionStack[this.identifierPtr--];
    this.intPtr--; // dimension from the variabledeclaratorid
    TypeReference type = (TypeReference) this.astStack[this.astPtr--];
    this.astLengthPtr --;
    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

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.