Class MethodUtils

java.lang.Object
org.chenile.core.util.MethodUtils

public abstract class MethodUtils extends Object
Given an OperationDefinition and a service class, this class computes the java.lang.reflect.Method.
  • Constructor Details

    • MethodUtils

      public MethodUtils()
  • Method Details

    • computeMethod

      public static Method computeMethod(Class<?> clazz, OperationDefinition od)
      Note that this uses the ParamDefinition.getParamClass() to compute the method. This is because the param class will return the definition of the request body in the actual class and not in the context of the instance. for example consider the following code: public class A{ public void consumer(T t){} } public class Bar extends Foo{}
      Parameters:
      clazz - - the class whose method we need to compute
      od - - the operation definition that defines the method's name and other details
      Returns:
      - the method that needs to be invoked. Null if the method is not found.