Examples of AllocationExpression


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

            if (typeBinding != null) {
              return typeBinding;
            }
          } else if (astNode instanceof AllocationExpression) {
            // should be an AllocationExpression
            AllocationExpression allocationExpression = (AllocationExpression) astNode;
            return this.getTypeBinding(allocationExpression.resolvedType);
          }
          break;
        case ASTNode.SIMPLE_NAME :
        case ASTNode.QUALIFIED_NAME :
View Full Code Here

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

      MessageSend messageSend = (MessageSend) node;
      IMethodBinding method = getMethodBinding(messageSend.binding);
      if (method == null) return null;
      return method.getReturnType();
    } else if (node instanceof AllocationExpression) {
      AllocationExpression allocation = (AllocationExpression) node;
      return getTypeBinding(allocation.resolvedType);
    } else if (node instanceof JavadocImplicitTypeReference) {
      JavadocImplicitTypeReference implicitRef = (JavadocImplicitTypeReference) node;
      return getTypeBinding(implicitRef.resolvedType);
    } else if (node instanceof org.eclipse.jdt.internal.compiler.ast.TypeParameter) {
View Full Code Here

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

      return this.getVariableBinding(fieldDeclaration.binding);
    } else if (node instanceof MessageSend) {
      MessageSend messageSend = (MessageSend) node;
      return getMethodBinding(messageSend.binding);
    } else if (node instanceof AllocationExpression) {
      AllocationExpression allocation = (AllocationExpression) node;
      return getMethodBinding(allocation.binding);
    } else if (node instanceof JavadocImplicitTypeReference) {
      JavadocImplicitTypeReference implicitRef = (JavadocImplicitTypeReference) node;
      return getTypeBinding(implicitRef.resolvedType);
    } else if (node instanceof org.eclipse.jdt.internal.compiler.ast.TypeParameter) {
View Full Code Here

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

  switch(fieldDeclaration.getKind()) {
    case AbstractVariableDeclaration.ENUM_CONSTANT:
      if (this.reportReferenceInfo) {
        // accept constructor reference for enum constant
        if (fieldDeclaration.initialization instanceof AllocationExpression) {
          AllocationExpression alloc = (AllocationExpression) fieldDeclaration.initialization;
          this.requestor.acceptConstructorReference(
            declaringType.name,
            alloc.arguments == null ? 0 : alloc.arguments.length,
            alloc.sourceStart);
        }
View Full Code Here

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

  if (isConstructor) {
    int start = -1;
    if(location instanceof AllocationExpression) {
      // omit the new keyword from the warning marker
      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
      AllocationExpression allocationExpression = (AllocationExpression) location;
      if (allocationExpression.enumConstant != null) {
        start = allocationExpression.enumConstant.sourceStart;
      }
      start = allocationExpression.type.sourceStart;
    }
View Full Code Here

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

      && (((ExplicitConstructorCall) statement).accessMode == ExplicitConstructorCall.ImplicitSuper);

  int sourceStart = statement.sourceStart;
  int sourceEnd = statement.sourceEnd;
  if (statement instanceof AllocationExpression) {
    AllocationExpression allocation = (AllocationExpression)statement;
    if (allocation.enumConstant != null) {
      sourceStart = allocation.enumConstant.sourceStart;
      sourceEnd = allocation.enumConstant.sourceEnd;
    }
  }
View Full Code Here

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

  if (!javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) return;
  int sourceStart = statement.sourceStart;
  int sourceEnd = statement.sourceEnd;
  if (statement instanceof AllocationExpression) {
    AllocationExpression allocation = (AllocationExpression)statement;
    if (allocation.enumConstant != null) {
      sourceStart = allocation.enumConstant.sourceStart;
      sourceEnd = allocation.enumConstant.sourceEnd;
    }
  }
View Full Code Here

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

  // ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt

  // ClassBodyopt produces a null item on the astStak if it produces NO class body
  // An empty class body produces a 0 on the length stack.....

  AllocationExpression alloc;
  int length;
  if (((length = this.astLengthStack[this.astLengthPtr--]) == 1)
    && (this.astStack[this.astPtr] == null)) {
    //NO ClassBody
    this.astPtr--;
    if (isQualified) {
      alloc = new QualifiedAllocationExpression();
    } else {
      alloc = new AllocationExpression();
    }
    alloc.sourceEnd = this.endPosition; //the position has been stored explicitly

    if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
      this.expressionPtr -= length;
View Full Code Here

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

  qae.sourceStart = qae.enclosingInstance.sourceStart;
  consumeInvocationExpression();
}
protected void consumeClassInstanceCreationExpressionWithTypeArguments() {
  // ClassInstanceCreationExpression ::= 'new' TypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt
  AllocationExpression alloc;
  int length;
  if (((length = this.astLengthStack[this.astLengthPtr--]) == 1)
    && (this.astStack[this.astPtr] == null)) {
    //NO ClassBody
    this.astPtr--;
    alloc = new AllocationExpression();
    alloc.sourceEnd = this.endPosition; //the position has been stored explicitly

    if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
      this.expressionPtr -= length;
      System.arraycopy(
View Full Code Here

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

               0,
               length);
      }
      enumConstant.initialization = allocationExpression;
   } else {
      AllocationExpression allocationExpression = new AllocationExpression();
      allocationExpression.enumConstant = enumConstant;
      // fill arguments if needed
      int length;
      if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
         this.expressionPtr -= length;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.