public static enum Expression.Feature extends Enum<Expression.Feature>
Features should be defined such that not setting a feature on an expression is a safe default. That way if they get accidentally dropped in a transformation we simply generate less efficient code, not incorrect code.
| Enum Constant and Description |
|---|
CHEAP
The expression is 'cheap'.
|
NON_NULLABLE
The expression is guaranteed to not return null.
|
| Modifier and Type | Method and Description |
|---|---|
static Expression.Feature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Expression.Feature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Expression.Feature NON_NULLABLE
public static final Expression.Feature CHEAP
Cheapness is useful when deciding if it would be reasonable to evaluate an expression more than once if the alternative is generating additional fields and save/restore code.
public static Expression.Feature[] values()
for (Expression.Feature c : Expression.Feature.values()) System.out.println(c);
public static Expression.Feature valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null