Annotation Type BeforeTry


  • @Target({ANNOTATION_TYPE,METHOD})
    @Retention(RUNTIME)
    @API(status=EXPERIMENTAL,
         since="1.2.4")
    public @interface BeforeTry
    Annotate methods of a container class with @BeforeTry to have them run once before each try - the actual invocation of the property method with generated parameters - including properties of embedded containers.

    @BeforeTry methods are inherited from superclasses and implemented interfaces as long as they are not hidden or overridden.

    In embedded container classes the @BeforeTry methods from the inner container are run after the outer container's methods.

    The execution order of multiple @BeforeTry methods within the same container is not guaranteed and might change.

    Parameters of this method will be resolved using registered instances of ResolveParameterHook. Parameters with annotation ForAll are not allowed.

    See Also:
    AfterTry