Package org.spockframework.mock
Interface IMockMethod
-
- All Known Implementing Classes:
DynamicMockMethod,StaticMockMethod
public interface IMockMethodRepresents a method that can be mocked. Typically but not necessarily corresponds to a physically declared method in an interface or class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetName()Returns the name of the method.java.util.List<java.lang.Class<?>>getParameterTypes()Returns the parameter types of the method.java.lang.Class<?>getReturnType()Returns the return type of the method.booleanisStatic()Tells whether the method is static or an instance method.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the method.- Returns:
- the name of the method
-
getParameterTypes
java.util.List<java.lang.Class<?>> getParameterTypes()
Returns the parameter types of the method. In cases where no static type information is available, all arguments are assumed to have typeObject.- Returns:
- the parameter types of the method
-
getReturnType
java.lang.Class<?> getReturnType()
Returns the return type of the method. In cases where no static type information is available, the return type is assumed to beObject.- Returns:
- the return type of the method
-
isStatic
boolean isStatic()
Tells whether the method is static or an instance method.- Returns:
- whether the method is static or an instance method
-
-