Package org.glassfish.expressly.lang
Class ELSupport
java.lang.Object
org.glassfish.expressly.lang.ELSupport
- Direct Known Subclasses:
SimpleNode
A helper class that implements the Jakarta Expression Specification
- Version:
- $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidprivate static ObjectcoerceToArray(jakarta.el.ELContext elContext, Object sourceArray, Class<?> type) static final BooleancoerceToBoolean(Object obj) static final CharactercoerceToCharacter(Object obj) static final EnumcoerceToEnum(Object obj, Class type) private static <T> TcoerceToFunctionalInterface(jakarta.el.ELContext ctx, jakarta.el.LambdaExpression lambdaExpression, Class<T> type) protected static final NumbercoerceToNumber(Number number, Class<?> type) static final NumbercoerceToNumber(Object obj) static final NumbercoerceToNumber(Object obj, Class<?> type) protected static final NumbercoerceToNumber(String val, Class<?> type) static final StringcoerceToString(Object obj) static final <T> TcoerceToType(jakarta.el.ELContext elContext, Object obj, Class<T> type) static final <T> TcoerceToType(jakarta.el.ELContext elContext, Object obj, Class<T> type, boolean isEL22Compatible) static final intstatic final booleancontainsNulls(Object[] obj) static final booleanstatic final booleanisBigDecimalOp(Object obj0, Object obj1) static final booleanisBigIntegerOp(Object obj0, Object obj1) static final booleanisDoubleOp(Object obj0, Object obj1) static final booleanisDoubleStringOp(Object obj0, Object obj1) private static booleanisFunctionalInterface(Class<?> type) private static booleanisInObject(Method method) static final booleanstatic final booleanisStringFloat(String str) static final voidthrowUnhandled(Object base, Object property) static final Numberstatic final Number
-
Field Details
-
ZERO
-
-
Constructor Details
-
ELSupport
public ELSupport()
-
-
Method Details
-
throwUnhandled
- Throws:
jakarta.el.ELException
-
compare
- Parameters:
obj0- First object to be comparedobj1- Second object to be compared- Returns:
- The result (an int with values -1, 0, or 1) of the comparison
- Throws:
jakarta.el.ELException- when something goes wrong
-
equals
- Parameters:
obj0- Fisrt object to be comparedobj1- Second object to be compared- Returns:
- true if the objects compared equal
- Throws:
jakarta.el.ELException- when something goes wrong
-
coerceToBoolean
- Parameters:
obj- Object to be coerced- Returns:
- The result of coercion
- Throws:
IllegalArgumentException
-
coerceToEnum
-
coerceToArray
-
coerceToFunctionalInterface
private static <T> T coerceToFunctionalInterface(jakarta.el.ELContext ctx, jakarta.el.LambdaExpression lambdaExpression, Class<T> type) -
coerceToCharacter
- Throws:
IllegalArgumentException
-
coerceToNumber
-
coerceToNumber
protected static final Number coerceToNumber(Number number, Class<?> type) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
coerceToNumber
public static final Number coerceToNumber(Object obj, Class<?> type) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
coerceToNumber
protected static final Number coerceToNumber(String val, Class<?> type) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
coerceToString
- Parameters:
obj- Object to be coerced- Returns:
- The result of coercion
-
checkType
- Throws:
IllegalArgumentException
-
coerceToType
public static final <T> T coerceToType(jakarta.el.ELContext elContext, Object obj, Class<T> type) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
coerceToType
public static final <T> T coerceToType(jakarta.el.ELContext elContext, Object obj, Class<T> type, boolean isEL22Compatible) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
containsNulls
- Parameters:
obj- An array of objects- Returns:
- true if the array contains a null, false otherwise
-
isBigDecimalOp
-
isBigIntegerOp
-
isDoubleOp
-
isDoubleStringOp
-
isLongOp
-
isStringFloat
-
toFloat
-
toNumber
-
isFunctionalInterface
-
isInObject
-