Class MethodInvocationUtils

java.lang.Object
velo.ladealpha.fields.services.MethodInvocationUtils

public class MethodInvocationUtils extends Object
Utility methods not directly related to the RuntimeCompiler.
  • Constructor Details

    • MethodInvocationUtils

      public MethodInvocationUtils()
  • Method Details

    • invokeStaticMethod

      public static Object invokeStaticMethod(Class<?> c, String methodName, Object... args)
      Utility method to invoke the first static method in the given class that can accept the given parameters.
      Parameters:
      c - The class
      methodName - The method name
      args - The arguments for the method call
      Returns:
      The return value of the method call
      Throws:
      RuntimeException - If either the class or a matching method could not be found