Class DefaultTagHrefGenerator

java.lang.Object
com.tngtech.jgiven.impl.tag.DefaultTagHrefGenerator
All Implemented Interfaces:
TagHrefGenerator

public class DefaultTagHrefGenerator extends Object implements TagHrefGenerator
A default implementation of TagHrefGenerator. It just calls tagConfiguration.getHref().
Since:
0.9.5
  • Constructor Details

    • DefaultTagHrefGenerator

      public DefaultTagHrefGenerator()
  • Method Details

    • generateHref

      public String generateHref(TagConfiguration tagConfiguration, Annotation annotation, Object value)
      Description copied from interface: TagHrefGenerator
      Implement this method to generate the href for the given annotation and its value.

      Note that when the value of the annotation is an array and IsTag.explodeArray() is true, then this method is called for each value of the array and not once for the whole array. Otherwise it is called only once.

      Specified by:
      generateHref in interface TagHrefGenerator
      Parameters:
      tagConfiguration - the configuration of the tag. The values typically correspond to the annotation. However, it is also possible to configure annotations to be tags using JGivenConfiguration, in which case there is no IsTag annotation.
      annotation - the actual annotation that was used as a tag. Note that this can be null in the case of dynamically added tags.
      value - the value of the annotation. If the annotation has no value the default value is passed (IsTag.value()
      Returns:
      the description of the annotation for the given value