|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={ANNOTATION_TYPE,PARAMETER})
public @interface ParametersSuppliedBy
Marking a Theory method parameter with this annotation causes it to be supplied with values from
the named ParameterSupplier when run as a theory by the Theories runner.
In addition, annotations themselves can be marked with this annotation, and then used similarly. ParameterSuppliedBy annotations on parameters are detected by searching up this hierarchy such that these act as syntactic sugar, making:
@ParametersSuppliedBy(Supplier.class)
public @interface SpecialParameter { }
@Theory
public void theoryMethod(@SpecialParameter String param) {
...
}
equivalent to:
@Theory
public void theoryMethod(@ParametersSuppliedBy(Supplier.class) String param) {
...
}
| Required Element Summary | |
|---|---|
Class<? extends ParameterSupplier> |
value
|
| Element Detail |
|---|
public abstract Class<? extends ParameterSupplier> value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||