Package javax.el
Class ELUtil
java.lang.Object
javax.el.ELUtil
Utility methods for this portion of the Jakarta Expression Language implementation
Methods on this class use a Map instance stored in ThreadLocal storage to minimize the performance impact on operations that take place multiple times on a single Thread. The keys and values of the Map are implementation private.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ExpressionFactory
private static ThreadLocal
<Map<String, ResourceBundle>> TheThreadLocal
variable used to record thejavax.faces.context.FacesContext
instance for each processing thread. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Object[]
buildParameters
(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params) (package private) static Constructor
<?> findConstructor
(Class<?> klass, Class<?>[] paramTypes, Object[] params) (package private) static Method
findMethod
(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues) (package private) static Method
findMethod
(Class<?> klass, String methodName, Class<?>[] paramTypes, Object[] params, boolean staticOnly) private static ELUtil.Wrapper
findMostSpecificWrapper
(List<ELUtil.Wrapper> candidates, Class<?>[] matchingTypes, boolean elSpecific, String errorMsg) private static ELUtil.Wrapper
findWrapper
(Class<?> clazz, List<ELUtil.Wrapper> wrappers, String name, Class<?>[] paramTypes, Object[] paramValues) private static Class
<?> getBoxingTypeIfPrimitive
(Class<?> clazz) private static Class<?>[]
getComparingParamTypesForVarArgsMethod
(Class<?>[] paramTypes, int length) (package private) static Constructor
<?> getConstructor
(Class<?> type, Constructor<?> c) private static Map
<String, ResourceBundle> static String
getExceptionMessageString
(ELContext context, String messageId) Convenience method, calls through to getExceptionMessageString(ELContext,java.lang.String,Object []).static String
getExceptionMessageString
(ELContext context, String messageId, Object[] params) (package private) static ExpressionFactory
(package private) static Method
private static Class<?>[]
getTypesFromValues
(Object[] values) (package private) static Object
invokeConstructor
(ELContext context, Constructor<?> constructor, Object[] params) (package private) static Object
invokeMethod
(ELContext context, Method method, Object base, Object[] params) (package private) static boolean
isAssignableFrom
(Class<?> src, Class<?> target) private static boolean
isCoercibleFrom
(Object src, Class<?> target) private static int
isMoreSpecific
(Class<?> type1, Class<?> type2, Class<?> matchingType, boolean elSpecific) private static int
isMoreSpecific
(ELUtil.Wrapper wrapper1, ELUtil.Wrapper wrapper2, Class<?>[] matchingTypes, boolean elSpecific) private static final String
paramString
(Class<?>[] types) private static void
setCurrentInstance
(Map<String, ResourceBundle> context) Replace the Map with the argument context.
-
Field Details
-
exprFactory
-
instance
The
ThreadLocal
variable used to record thejavax.faces.context.FacesContext
instance for each processing thread.
-
-
Constructor Details
-
ELUtil
private ELUtil()This class may not be constructed.
-
-
Method Details
-
getCurrentInstance
- Returns:
- a Map stored in ThreadLocal storage. This may be used by methods of this class to minimize the performance impact for operations that may take place multiple times on a given Thread instance.
-
setCurrentInstance
Replace the Map with the argument context.- Parameters:
context
- the Map to be stored in ThreadLocal storage.
-
getExceptionMessageString
Convenience method, calls through to getExceptionMessageString(ELContext,java.lang.String,Object []).- Parameters:
context
- the ELContext from which the Locale for this message is extracted.messageId
- the messageId String in the ResourceBundle- Returns:
- a localized String for the argument messageId
-
getExceptionMessageString
-
getExpressionFactory
-
findConstructor
-
invokeConstructor
-
findMethod
-
invokeMethod
-
findMethod
-
findWrapper
private static ELUtil.Wrapper findWrapper(Class<?> clazz, List<ELUtil.Wrapper> wrappers, String name, Class<?>[] paramTypes, Object[] paramValues) -
findMostSpecificWrapper
private static ELUtil.Wrapper findMostSpecificWrapper(List<ELUtil.Wrapper> candidates, Class<?>[] matchingTypes, boolean elSpecific, String errorMsg) -
isMoreSpecific
private static int isMoreSpecific(ELUtil.Wrapper wrapper1, ELUtil.Wrapper wrapper2, Class<?>[] matchingTypes, boolean elSpecific) -
isMoreSpecific
-
getBoxingTypeIfPrimitive
-
getComparingParamTypesForVarArgsMethod
-
paramString
-
isAssignableFrom
-
isCoercibleFrom
-
getTypesFromValues
-
getMethod
-
getConstructor
-
buildParameters
-