Class DynamicMockMethod

java.lang.Object
org.spockframework.mock.runtime.DynamicMockMethod
All Implemented Interfaces:
IMockMethod

public class DynamicMockMethod extends Object implements IMockMethod
  • Constructor Details

    • DynamicMockMethod

      public DynamicMockMethod(String methodName, int argumentCount, boolean isStatic)
    • DynamicMockMethod

      public DynamicMockMethod(String methodName, List<Class<?>> parameterTypes, Class<?> returnType, boolean isStatic)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IMockMethod
      Returns the name of the method.
      Specified by:
      getName in interface IMockMethod
      Returns:
      the name of the method
    • getParameterTypes

      public List<Class<?>> getParameterTypes()
      Description copied from interface: IMockMethod
      Returns the parameter types of the method. In cases where no static type information is available, all arguments are assumed to have type Object.
      Specified by:
      getParameterTypes in interface IMockMethod
      Returns:
      the parameter types of the method
    • getReturnType

      public Class<?> getReturnType()
      Description copied from interface: IMockMethod
      Returns the return type of the method. In cases where no static type information is available, the return type is assumed to be Object.
      Specified by:
      getReturnType in interface IMockMethod
      Returns:
      the return type of the method
    • isStatic

      public boolean isStatic()
      Description copied from interface: IMockMethod
      Tells whether the method is static or an instance method.
      Specified by:
      isStatic in interface IMockMethod
      Returns:
      whether the method is static or an instance method