Package org.hamcrest.internal
Class ReflectiveTypeFinder
- java.lang.Object
- org.hamcrest.internal.ReflectiveTypeFinder
public class ReflectiveTypeFinder extends Object
Constructor Summary
Constructors Constructor Description ReflectiveTypeFinder(String methodName, int expectedNumberOfParameters, int typedParameter)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canObtainExpectedTypeFrom(Method method)
protected Class<?>
expectedTypeFrom(Method method)
Class<?>
findExpectedType(Class<?> fromClass)
Constructor Detail
ReflectiveTypeFinder
public ReflectiveTypeFinder(String methodName, int expectedNumberOfParameters, int typedParameter)
Method Detail
findExpectedType
public Class<?> findExpectedType(Class<?> fromClass)
canObtainExpectedTypeFrom
protected boolean canObtainExpectedTypeFrom(Method method)
- Parameters:
method
- The method to examine.- Returns:
- true if this method references the relevant type
expectedTypeFrom
protected Class<?> expectedTypeFrom(Method method)
- Parameters:
method
- The method from which to extract- Returns:
- The type we're looking for