java.lang.Object
org.spockframework.runtime.model.Tag

public class Tag extends Object
Expresses a fact about a spec element. Mainly intended for reporting purposes. May carry additional data in form of a key-value pair, and may link to an external resource. Child elements inherit their parents' tags.
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Returns the display name of the tag.
      Returns:
      the display name of the tag
    • getKey

      public String getKey()
      Returns the filter key of the tag. Tags with the same key are mutually exclusive; a spec element cannot have two tags with the same key. A tag on a child element overrides any tag with the same key on a parent element. The filter key may be null, in which case the tag will not be amenable to filtering.
      Returns:
      the filter key of the tag
    • getValue

      public Object getValue()
      Returns the filter value of the tag. The value is either a string, or a number, or null if the tag doesn't have a value.
      Returns:
      the filter value of the tag
    • getUrl

      public String getUrl()
      Returns the URL associated with the tag, if any.
      Returns:
      the URL associated with the tag, if any
    • isFilterable

      public boolean isFilterable()
      Tells whether the tag is filterable.
      Returns:
      whether the tag is filterable