Examples of AllocationExpression


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

  IMethodBinding resolveConstructor(EnumConstantDeclaration enumConstantDeclaration) {
    org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(enumConstantDeclaration);
    if (node instanceof org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) {
      org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration = (org.aspectj.org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) node;
      if (fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT && fieldDeclaration.initialization != null) {
        AllocationExpression allocationExpression = (AllocationExpression) fieldDeclaration.initialization;
        return this.getMethodBinding(allocationExpression.binding);
      }
    }
    return null;
  }
View Full Code Here

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

            if (typeBinding != null) {
              return typeBinding;
            }
          } else {
            // 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.aspectj.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.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeParameter) {
View Full Code Here

Examples of org.aspectj.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.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeParameter) {
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

  }

  boolean isResolvedTypeInferredFromExpectedType(ClassInstanceCreation classInstanceCreation) {
    Object oldNode = this.newAstToOldAst.get(classInstanceCreation);
    if (oldNode instanceof AllocationExpression) {
      AllocationExpression allocationExpression = (AllocationExpression) oldNode;
      return allocationExpression.inferredReturnType;
    }
    return false;
  }
View Full Code Here

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

  IMethodBinding resolveConstructor(EnumConstantDeclaration enumConstantDeclaration) {
    org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(enumConstantDeclaration);
    if (node instanceof org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) {
      org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration = (org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) node;
      if (fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT && fieldDeclaration.initialization != null) {
        AllocationExpression allocationExpression = (AllocationExpression) fieldDeclaration.initialization;
        return getMethodBinding(allocationExpression.binding);
      }
    }
    return null;
  }
View Full Code Here

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
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.