Class ReflectionUtils


  • public class ReflectionUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ReflectionUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object callMethod​(java.lang.Object object, java.lang.String methodName, java.lang.Object... args)
      Call a method using introspection (so ones can call a private or protected method)
      private static java.lang.Object callMethodWithClassType​(java.lang.Object object, java.lang.String methodName, java.lang.Class<?>[] array, java.lang.Object... args)  
      • Methods inherited from class java.lang.Object

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

      • ReflectionUtils

        public ReflectionUtils()
    • Method Detail

      • callMethod

        public static java.lang.Object callMethod​(java.lang.Object object,
                                                  java.lang.String methodName,
                                                  java.lang.Object... args)
        Call a method using introspection (so ones can call a private or protected method)
        Parameters:
        object - object on which the method will be called
        methodName - method name
        args - arguments of this method (can be null)
        Returns:
        the value returned by this method (if this method returns a value)
      • callMethodWithClassType

        private static java.lang.Object callMethodWithClassType​(java.lang.Object object,
                                                                java.lang.String methodName,
                                                                java.lang.Class<?>[] array,
                                                                java.lang.Object... args)