Enum Class ExpressionContext

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

public enum ExpressionContext extends Enum<ExpressionContext>
  • Enum Constant Details

    • 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 Details

    • values

      public static ExpressionContext[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ExpressionContext valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • definesTargetType

      public abstract boolean definesTargetType()