Package net.jqwik.api

Class PropertyDefaults.PropertyDefaultsHook

    • Constructor Detail

      • PropertyDefaultsHook

        public PropertyDefaultsHook()
    • Method Detail

      • aroundProperty

        public PropertyExecutionResult aroundProperty​(PropertyLifecycleContext context,
                                                      PropertyExecutor property)
        Description copied from interface: AroundPropertyHook
        When you wrap a property you can do stuff before and/or after its execution. All implementors should invoke the property with property.execute() and either return the result of this call or map it to another result.
        Specified by:
        aroundProperty in interface AroundPropertyHook
        Parameters:
        context - The property's context object
        property - An executor to run the property
        Returns:
        The result of running the property
      • propagateTo

        public PropagationMode propagateTo()
        Description copied from interface: LifecycleHook
        Override this method if you want to change a concrete hook implementation's default propagation behaviour: Do not use hook in child elements -- sub containers or properties.
        Specified by:
        propagateTo in interface LifecycleHook
        Returns:
        propagation mode enum
      • appliesTo

        public boolean appliesTo​(java.util.Optional<java.lang.reflect.AnnotatedElement> element)
        Description copied from interface: LifecycleHook
        This method is called once per hook and potential element during lifecycle hooks registration.
        Specified by:
        appliesTo in interface LifecycleHook
        Parameters:
        element - The Optional instance contains element for container classes or method but is empty for the engine
        Returns:
        true if a hook shall be applied to this element