| Modifier and Type | Field and Description |
|---|---|
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static ConstantExpression | |
| private static Expression | |
| public static boolean | |
| public static boolean | Returns: true if the type equals the targetType or array thereofthe candidate type targetType, final boolean true if we can have multi-dimension arrays; should be false for annotation member types recurse)Determine if a type is derived from Number (or array thereof). |
| public static boolean | |
| public static boolean | |
| public static boolean | |
| public static boolean | Returns: true if the type equals the targetType or array thereofthe candidate type targetType, final ClassNode the type we are checking against type, final boolean true if we can have multi-dimension arrays; should be false for annotation member types recurse)Determine if a type matches another type (or array thereof). |
| private static Number | |
| public static ConstantExpression | Returns: the transformed expression or the original if no transformation was performedthe binary expression be, final ClassNode the type of the result targetType)Turns expressions of the form ConstantExpression(40) + ConstantExpression(2) into the simplified ConstantExpression(42) at compile time. |
| public static Expression | Returns: the transformed type or the original if no transformation was possiblethe original expression exp, final ClassNode the type that the final constant should be attrType)Converts simple expressions of constants into pre-evaluated simple constants. |
| public static Expression | Returns: the converted expressionthe original expression exp)The attribute values of annotations must be primitive, String or Enum constants. |
| public static Expression | Returns: the transformed list or the original if nothing was changedthe list to transform origList, final ClassNode the target type attrType)Given a list of constants, transform each item in the list. |
| HANDLED_TYPES | back to summary |
|---|---|
| private static final int[] HANDLED_TYPES | |
| ExpressionUtils | back to summary |
|---|---|
| private ExpressionUtils() | |
| configure | back to summary |
|---|---|
| private static ConstantExpression configure(final Expression origX, final ConstantExpression newX) | |
| findConstant | back to summary |
|---|---|
| private static Expression findConstant(final FieldNode fn) | |
| isNullConstant | back to summary |
|---|---|
| public static boolean isNullConstant(final Expression expr) | |
| isNumberOrArrayOfNumber | back to summary |
|---|---|
| public static boolean isNumberOrArrayOfNumber(final ClassNode targetType, final boolean recurse) Determine if a type is derived from Number (or array thereof).
| |
| isSuperExpression | back to summary |
|---|---|
| public static boolean isSuperExpression(final Expression expression) | |
| isThisExpression | back to summary |
|---|---|
| public static boolean isThisExpression(final Expression expression) | |
| isThisOrSuper | back to summary |
|---|---|
| public static boolean isThisOrSuper(final Expression expression) | |
| isTypeOrArrayOfType | back to summary |
|---|---|
| public static boolean isTypeOrArrayOfType(final ClassNode targetType, final ClassNode type, final boolean recurse) Determine if a type matches another type (or array thereof). | |
| safeNumber | back to summary |
|---|---|
| private static Number safeNumber(final ConstantExpression constX) | |
| transformBinaryConstantExpression | back to summary |
|---|---|
| public static ConstantExpression transformBinaryConstantExpression(final BinaryExpression be, final ClassNode targetType) Turns expressions of the form ConstantExpression(40) + ConstantExpression(2) into the simplified ConstantExpression(42) at compile time.
| |
| transformInlineConstants | back to summary |
|---|---|
| public static Expression transformInlineConstants(final Expression exp, final ClassNode attrType) Converts simple expressions of constants into pre-evaluated simple constants. Handles:
| |
| transformInlineConstants | back to summary |
|---|---|
| public static Expression transformInlineConstants(final Expression exp) The attribute values of annotations must be primitive, String or Enum constants. In various places, such constants can be seen during type resolution but won't be readily accessible in later phases, e.g. they might be embedded into constructor code. This method transforms constants that would appear in annotations early so they aren't lost. Subsequent processing determines whether they are valid, this method simply retains the constant value as a constant expression.
| |
| transformListOfConstants | back to summary |
|---|---|
| public static Expression transformListOfConstants(final ListExpression origList, final ClassNode attrType) Given a list of constants, transform each item in the list.
| |