org.aspectj.org.eclipse.jdt.internal.compiler.ast
Enum ExpressionContext

java.lang.Object
  extended by java.lang.Enum<ExpressionContext>
      extended by org.aspectj.org.eclipse.jdt.internal.compiler.ast.ExpressionContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ExpressionContext>

public enum ExpressionContext
extends java.lang.Enum<ExpressionContext>


Enum Constant Summary
ASSIGNMENT_CONTEXT
          Assignment context: potential poly-expressions are: method invocations, lambdas, reference expressions, conditional expressions and allocation expressions.
CASTING_CONTEXT
          Casting context: potential poly-expressions are: lambdas and reference expressions Context induced by: CastExpression.
INVOCATION_CONTEXT
          Invocation context: potential poly-expressions are: method invocations, lambdas, reference expressions, conditional expressions and allocation expressions.
VANILLA_CONTEXT
          Vanilla context (string, numeric): potential poly-expressions are: NONE.
 
Method Summary
abstract  boolean definesTargetType()
           
static ExpressionContext valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ExpressionContext[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ASSIGNMENT_CONTEXT

public static final ExpressionContext ASSIGNMENT_CONTEXT
Assignment context: potential poly-expressions are: method invocations, lambdas, reference expressions, conditional expressions and allocation expressions. This is the only Java 7 context where target type influenced evaluation of some expression. Context induced by: ReturnStatement, ArrayInitializer, Assignment, FieldDeclaration and LocalDeclaration.


INVOCATION_CONTEXT

public static final ExpressionContext INVOCATION_CONTEXT
Invocation context: potential poly-expressions are: method invocations, lambdas, reference expressions, conditional expressions and allocation expressions. At this point, we don't distinguish between strict and loose invocation contexts - we may have to cross the bridge some day. Context induced by: AllocationExpression, QualifiedAllocationExpression, ExplicitConstructorCall, MessageSend CodeSnippetAllocationExpression and CodeSnippetMessageSend.


CASTING_CONTEXT

public static final ExpressionContext CASTING_CONTEXT
Casting context: potential poly-expressions are: lambdas and reference expressions Context induced by: CastExpression.


VANILLA_CONTEXT

public static final ExpressionContext VANILLA_CONTEXT
Vanilla context (string, numeric): potential poly-expressions are: NONE. This is the nonpoly context in which expressions get evaluated, unless they feature in one of the above contexts.

Method Detail

values

public static ExpressionContext[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ExpressionContext c : ExpressionContext.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ExpressionContext valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

definesTargetType

public abstract boolean definesTargetType()