Class RMMethodUtils

java.lang.Object
com.inductiveautomation.rm.base.RMMethodUtils

public class RMMethodUtils extends Object
Utility methods for method reflection.
  • Constructor Details

    • RMMethodUtils

      public RMMethodUtils()
  • Method Details

    • getMethod

      public static Method getMethod(Object anObj, String aMethod, Class... parameterTypes)
      Returns the method for the given object, method name and paramter types class array.
    • invoke

      public static Object invoke(Object anObj, String aMethod)
      Calls the given method name on the given object.
    • invoke

      public static Object invoke(Object anObj, String aMethod, Object aValue, Class parameterType)
      Calls the given method name on the given object with the given parameter of the given class.
    • invoke

      public static Object invoke(Object anObj, String aMethod, Object[] parameters, Class[] parameterTypes)
      Calls the given method name on the given object with the given arg array and class array.
    • invoke

      public static Object invoke(Object anObj, Method aMethod, Object... parameters)
      Calls the given method name on the given object with the given arg array and class array.
    • invokeAll

      public static void invokeAll(List targets, String aMethod, Object aValue, Class aClass)
      Invokes a given method on every member of a List. Any method not implemented by the object is simply ignored - invoke() returns null if the class doesn't have the method. The method's return values are also ignored (this isn't aggregation, just invocation).