Examples of AllocationExpression


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

  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

      && (((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

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