Package net.jqwik.api.lifecycle
Interface PropertyLifecycleContext
-
- All Superinterfaces:
LifecycleContext
@API(status=MAINTAINED, since="1.4.0") public interface PropertyLifecycleContext extends LifecycleContext
The context information of a property or example.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropertyAttributes
attributes()
An object to query, set or change a property method's attributes.java.lang.Class<?>
containerClass()
The container class in which the current property method is running.java.lang.String
extendedLabel()
The extended label contains additional information about the current container class.java.lang.reflect.Method
targetMethod()
The method that defines the current property or example.java.lang.Object
testInstance()
The current instance of the property's container class.-
Methods inherited from interface net.jqwik.api.lifecycle.LifecycleContext
findAnnotation, findAnnotationsInContainer, label, newInstance, optionalContainerClass, optionalElement, reporter, resolveParameter, wrapReporter
-
-
-
-
Method Detail
-
targetMethod
java.lang.reflect.Method targetMethod()
The method that defines the current property or example.- Returns:
- a Method instance
-
containerClass
java.lang.Class<?> containerClass()
The container class in which the current property method is running.Most of the time that's also the defining class. It differs when running properties that are defined in a super class or an implemented interface.
- Returns:
- a Class instance
-
testInstance
java.lang.Object testInstance()
The current instance of the property's container class. There is exactly one instance per property method.- Returns:
- an instance of the container class in which the current property method is running
-
extendedLabel
@API(status=EXPERIMENTAL, since="1.2.3") java.lang.String extendedLabel()
The extended label contains additional information about the current container class.- Returns:
- a String
-
attributes
@API(status=EXPERIMENTAL, since="1.3.4") PropertyAttributes attributes()
An object to query, set or change a property method's attributes.- Returns:
- the attributes holder
-
-