Class MethodReflectionUtils


  • public class MethodReflectionUtils
    extends java.lang.Object
    Date: 30/12/2017
    Author:
    Yaron Yamin
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T getReturnTypeReflectively​(java.lang.Object object, java.lang.Class ownerClass, java.lang.Class<T> returnClass, @Nullable java.lang.String methodName, java.lang.Object... params)  
      static <T> T invokeMethodReflectivelyWithFallback​(java.lang.Object owner, java.lang.Class<T> returnClass, java.lang.String methodName, @Nullable java.lang.String fallbackMethodName)  
      • Methods inherited from class java.lang.Object

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

      • MethodReflectionUtils

        public MethodReflectionUtils()
    • Method Detail

      • getReturnTypeReflectively

        @Nullable
        public static <T> T getReturnTypeReflectively​(java.lang.Object object,
                                                      java.lang.Class ownerClass,
                                                      java.lang.Class<T> returnClass,
                                                      @Nullable
                                                      @Nullable java.lang.String methodName,
                                                      java.lang.Object... params)
      • invokeMethodReflectivelyWithFallback

        @Nullable
        public static <T> T invokeMethodReflectivelyWithFallback​(java.lang.Object owner,
                                                                 java.lang.Class<T> returnClass,
                                                                 java.lang.String methodName,
                                                                 @Nullable
                                                                 @Nullable java.lang.String fallbackMethodName)