Top Description Inners Fields Constructors Methods
javax.el

pack-priv Class ELUtil

extends Object
Class Inheritance
Imports
java.lang.reflect.Array, .Constructor, .InvocationTargetException, .Method, .Modifier, java.text.MessageFormat, java.util.ArrayList, .HashMap, .Iterator, .List, .Locale, .Map, .MissingResourceException, .ResourceBundle

Utility methods for this portion of the EL 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.

Authors
edburns, Kin-man Chung, Dongbin Nie

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private abstract static class

Field Summary

Modifier and TypeField and Description
public static ExpressionFactory
private static ThreadLocal<Map<String, ResourceBundle>>
instance

The ThreadLocal variable used to record the javax.faces.context.FacesContext instance for each processing thread.

Constructor Summary

AccessConstructor and Description
private
ELUtil()

This class may not be constructed.

Method Summary

Modifier and TypeMethod and Description
pack-priv static Object[]
buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params)

pack-priv static Constructor<?>
findConstructor(Class<?> klass, Class<?>[] paramTypes, Object[] params)

pack-priv static Method
findMethod(Class<?> klass, String method, Class<?>[] paramTypes, Object[] params, boolean staticOnly)

pack-priv static Method
findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues)

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<?>
private static Class<?>[]
getComparingParamTypesForVarArgsMethod(Class<?>[] paramTypes, int length)

pack-priv static Constructor<?>
private static Map<String, ResourceBundle>

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.
getCurrentInstance
()

public static String
public static String
getExceptionMessageString(ELContext context, String messageId, Object[] params)

pack-priv static ExpressionFactory
pack-priv static Method
getMethod(Class<?> type, Method m)

private static Class<?>[]
pack-priv static Object
invokeConstructor(ELContext context, Constructor<?> c, Object[] params)

pack-priv static Object
invokeMethod(ELContext context, Method m, Object base, Object[] params)

pack-priv static boolean
isAssignableFrom(Class<?> src, Class<?> target)

private static boolean
isCoercibleFrom(Object src, Class<?> target)

private static int
isMoreSpecific(ELUtil.Wrapper wrapper1, ELUtil.Wrapper wrapper2, Class<?>[] matchingTypes, boolean elSpecific)

private static int
isMoreSpecific(Class<?> type1, Class<?> type2, Class<?> matchingType, boolean elSpecific)

private static final String
paramString(Class<?>[] types)

private static void
setCurrentInstance(Map<String, ResourceBundle>
the Map to be stored in ThreadLocal storage.
context
)

Replace the Map with the argument context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exprFactoryback to summary
public static ExpressionFactory exprFactory
instanceback to summary
private static ThreadLocal<Map<String, ResourceBundle>> instance

The ThreadLocal variable used to record the javax.faces.context.FacesContext instance for each processing thread.

Constructor Detail

ELUtilback to summary
private ELUtil()

This class may not be constructed.

Method Detail

buildParametersback to summary
pack-priv static Object[] buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params)
findConstructorback to summary
pack-priv static Constructor<?> findConstructor(Class<?> klass, Class<?>[] paramTypes, Object[] params)
findMethodback to summary
pack-priv static Method findMethod(Class<?> klass, String method, Class<?>[] paramTypes, Object[] params, boolean staticOnly)
findMethodback to summary
pack-priv static Method findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues)
findMostSpecificWrapperback to summary
private static ELUtil.Wrapper findMostSpecificWrapper(List<ELUtil.Wrapper> candidates, Class<?>[] matchingTypes, boolean elSpecific, String errorMsg)
findWrapperback to summary
private static ELUtil.Wrapper findWrapper(Class<?> clazz, List<ELUtil.Wrapper> wrappers, String name, Class<?>[] paramTypes, Object[] paramValues)
getBoxingTypeIfPrimitiveback to summary
private static Class<?> getBoxingTypeIfPrimitive(Class<?> clazz)
getComparingParamTypesForVarArgsMethodback to summary
private static Class<?>[] getComparingParamTypesForVarArgsMethod(Class<?>[] paramTypes, int length)
getConstructorback to summary
pack-priv static Constructor<?> getConstructor(Class<?> type, Constructor<?> c)
getCurrentInstanceback to summary
private static Map<String, ResourceBundle> getCurrentInstance()
Returns:Map<String, ResourceBundle>

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.

getExceptionMessageStringback to summary
public static String getExceptionMessageString(ELContext context, String messageId)
getExceptionMessageStringback to summary
public static String getExceptionMessageString(ELContext context, String messageId, Object[] params)
getExpressionFactoryback to summary
pack-priv static ExpressionFactory getExpressionFactory()
getMethodback to summary
pack-priv static Method getMethod(Class<?> type, Method m)
getTypesFromValuesback to summary
private static Class<?>[] getTypesFromValues(Object[] values)
invokeConstructorback to summary
pack-priv static Object invokeConstructor(ELContext context, Constructor<?> c, Object[] params)
invokeMethodback to summary
pack-priv static Object invokeMethod(ELContext context, Method m, Object base, Object[] params)
isAssignableFromback to summary
pack-priv static boolean isAssignableFrom(Class<?> src, Class<?> target)
isCoercibleFromback to summary
private static boolean isCoercibleFrom(Object src, Class<?> target)
isMoreSpecificback to summary
private static int isMoreSpecific(ELUtil.Wrapper wrapper1, ELUtil.Wrapper wrapper2, Class<?>[] matchingTypes, boolean elSpecific)
isMoreSpecificback to summary
private static int isMoreSpecific(Class<?> type1, Class<?> type2, Class<?> matchingType, boolean elSpecific)
paramStringback to summary
private static final String paramString(Class<?>[] types)
setCurrentInstanceback to summary
private static void setCurrentInstance(Map<String, ResourceBundle> context)

Replace the Map with the argument context.

Parameters
context:Map<String, ResourceBundle>

the Map to be stored in ThreadLocal storage.

javax.el back to summary

private Class ELUtil.ConstructorWrapper

extends Wrapper
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Constructor<?>
c

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]
public boolean
public boolean
public Object
unWrap()

Implements abstract javax.el.ELUtil.Wrapper.unWrap.

Inherited from javax.el.ELUtil.Wrapper:
wrapwrap

Field Detail

cback to summary
private final Constructor<?> c

Constructor Detail

ConstructorWrapperback to summary
public ConstructorWrapper(Constructor<?> c)

Method Detail

getParameterTypesback to summary
public Class<?>[] getParameterTypes()

Implements abstract javax.el.ELUtil.Wrapper.getParameterTypes.

Annotations
@Override
isBridgeback to summary
public boolean isBridge()

Implements abstract javax.el.ELUtil.Wrapper.isBridge.

Annotations
@Override
isVarArgsback to summary
public boolean isVarArgs()

Implements abstract javax.el.ELUtil.Wrapper.isVarArgs.

Annotations
@Override
unWrapback to summary
public Object unWrap()

Implements abstract javax.el.ELUtil.Wrapper.unWrap.

Annotations
@Override
javax.el back to summary

private Class ELUtil.MethodWrapper

extends Wrapper
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Method
m

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>[]
public boolean
public boolean
public Object
unWrap()

Implements abstract javax.el.ELUtil.Wrapper.unWrap.

Inherited from javax.el.ELUtil.Wrapper:
wrapwrap

Field Detail

mback to summary
private final Method m

Constructor Detail

MethodWrapperback to summary
public MethodWrapper(Method m)

Method Detail

getParameterTypesback to summary
public Class<?>[] getParameterTypes()

Implements abstract javax.el.ELUtil.Wrapper.getParameterTypes.

Annotations
@Override
isBridgeback to summary
public boolean isBridge()

Implements abstract javax.el.ELUtil.Wrapper.isBridge.

Annotations
@Override
isVarArgsback to summary
public boolean isVarArgs()

Implements abstract javax.el.ELUtil.Wrapper.isVarArgs.

Annotations
@Override
unWrapback to summary
public Object unWrap()

Implements abstract javax.el.ELUtil.Wrapper.unWrap.

Annotations
@Override
javax.el back to summary

private abstract Class ELUtil.Wrapper

extends Object
Class Inheritance
Known Direct Subclasses
javax.el.ELUtil.MethodWrapper, javax.el.ELUtil.ConstructorWrapper

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract Class<?>[]
public abstract boolean
public abstract boolean
public abstract Object
public static List<ELUtil.Wrapper>
wrap(Method[] methods, String name)

public static List<ELUtil.Wrapper>
wrap(Constructor<?>[] constructors)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Wrapperback to summary
private Wrapper()

Method Detail

getParameterTypesback to summary
public abstract Class<?>[] getParameterTypes()
isBridgeback to summary
public abstract boolean isBridge()
isVarArgsback to summary
public abstract boolean isVarArgs()
unWrapback to summary
public abstract Object unWrap()
wrapback to summary
public static List<ELUtil.Wrapper> wrap(Method[] methods, String name)
wrapback to summary
public static List<ELUtil.Wrapper> wrap(Constructor<?>[] constructors)