Class ReflectionUtil


  • @Internal
    public final class ReflectionUtil
    extends java.lang.Object
    Utility class for invoking Java reflection.

    CEL Library Internals. Do Not Use.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.reflect.Method getMethod​(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... params)  
      static java.lang.Class<?> getRawType​(java.lang.reflect.Type type)
      Extracts the raw Class from a Type.
      static java.lang.Object invoke​(java.lang.reflect.Method method, java.lang.Object object, java.lang.Object... params)  
      static java.lang.reflect.Type resolveGenericParameter​(com.google.common.reflect.TypeToken<?> token, java.lang.Class<?> baseClass, int index)
      Resolves a generic parameter of a base class from a type token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getMethod

        public static java.lang.reflect.Method getMethod​(java.lang.Class<?> clazz,
                                                         java.lang.String methodName,
                                                         java.lang.Class<?>... params)
      • invoke

        public static java.lang.Object invoke​(java.lang.reflect.Method method,
                                              java.lang.Object object,
                                              java.lang.Object... params)
      • resolveGenericParameter

        public static java.lang.reflect.Type resolveGenericParameter​(com.google.common.reflect.TypeToken<?> token,
                                                                     java.lang.Class<?> baseClass,
                                                                     int index)
        Resolves a generic parameter of a base class from a type token.
      • getRawType

        public static java.lang.Class<?> getRawType​(java.lang.reflect.Type type)
        Extracts the raw Class from a Type. Handles Class, ParameterizedType, and WildcardType (returns upper bound). Returns Object.class as fallback.