Package net.jqwik.api.lifecycle
Interface InvokePropertyMethodHook
-
- All Superinterfaces:
LifecycleHook
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@API(status=EXPERIMENTAL, since="1.6.0") @FunctionalInterface public interface InvokePropertyMethodHook extends LifecycleHook
Implement this hook to override behaviour that invokes a method through reflection. Per default ReflectionSupport.invokeMethod(Method, Object, Object...) is called.Caveat: Only one hook per property method is possible.
-
-
Field Summary
Fields Modifier and Type Field Description static InvokePropertyMethodHook
DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
invoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object... args)
Invoke a method through some reflective mechanism.-
Methods inherited from interface net.jqwik.api.lifecycle.LifecycleHook
appliesTo, propagateTo
-
-
-
-
Field Detail
-
DEFAULT
static final InvokePropertyMethodHook DEFAULT
-
-
Method Detail
-
invoke
java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object target, java.lang.Object... args) throws java.lang.Throwable
Invoke a method through some reflective mechanism. You may want to override the default call if invocation requires something special.- Parameters:
method
- A method to be calledtarget
- An instance of the method's declaring class or null if it's a static methodargs
- The arguments to user for method call- Returns:
- any object
- Throws:
java.lang.Throwable
-
-