Package spock.lang

Annotation Type Subject


@Retention(RUNTIME)
@Target({TYPE,FIELD,LOCAL_VARIABLE})
@Repeatable(Container.class)
public @interface Subject
Indicates which objects/classes are the subjects of a specification. If applied to a field, indicates that the field holds the subject of the specification. If applied to a class, indicates that the classes listed as annotation arguments are the subjects of the specification. Currently, this annotation has only informational purposes.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  Subject.Container  
  • Optional Element Summary

    Optional Elements
    Modifier and Type Optional Element Description
    Class<?>[] value
    The classes which are the subjects of the specification.
  • Element Details

    • value

      Class<?>[] value
      The classes which are the subjects of the specification. Irrelevant if the annotation is applied to a field.
      Returns:
      the classes which are the subjects of the specification
      Default:
      {java.lang.Void.class}