Documentation of 'com.datumbox.framework.common.utilities.ReflectionMethods' Java class
ReflectionMethods
com.datumbox.framework.common.utilities

Class ReflectionMethods



  • public class ReflectionMethods
    extends java.lang.Object
    The ReflectionMethods class contains a list of utility methods related to Reflection.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.reflect.Method findMethod(java.lang.Object obj, java.lang.String methodName, java.lang.Object... params)
      Finds the public, protected, default or private method of the object with the provided name and parameters.
      static java.util.List<java.lang.reflect.Field> getAllFields(java.util.List<java.lang.reflect.Field> fields, java.lang.Class<?> type)
      Gets all the fields recursively from all the parent classes.
      static java.lang.Object invokeMethod(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object... params)
      Invokes a method on the object using reflection.
      static java.lang.Object invokeMethod(java.lang.Object obj, java.lang.String methodName, java.lang.Object... params)
      Invokes a method on the object using reflection.
      • Methods inherited from class java.lang.Object

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

      • ReflectionMethods

        public ReflectionMethods()
    • Method Detail

      • getAllFields

        public static java.util.List<java.lang.reflect.Field> getAllFields(java.util.List<java.lang.reflect.Field> fields,
                                                                           java.lang.Class<?> type)
        Gets all the fields recursively from all the parent classes.
        Parameters:
        fields -
        type -
        Returns:
      • findMethod

        public static java.lang.reflect.Method findMethod(java.lang.Object obj,
                                                          java.lang.String methodName,
                                                          java.lang.Object... params)
        Finds the public, protected, default or private method of the object with the provided name and parameters.
        Parameters:
        obj -
        methodName -
        params -
        Returns:
      • invokeMethod

        public static java.lang.Object invokeMethod(java.lang.Object obj,
                                                    java.lang.reflect.Method method,
                                                    java.lang.Object... params)
        Invokes a method on the object using reflection.
        Parameters:
        obj -
        method -
        params -
        Returns:
      • invokeMethod

        public static java.lang.Object invokeMethod(java.lang.Object obj,
                                                    java.lang.String methodName,
                                                    java.lang.Object... params)
        Invokes a method on the object using reflection.
        Parameters:
        obj -
        methodName -
        params -
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.