Package com.tngtech.jgiven.impl.tag
Class DefaultTagDescriptionGenerator
java.lang.Object
com.tngtech.jgiven.impl.tag.DefaultTagDescriptionGenerator
- All Implemented Interfaces:
TagDescriptionGenerator
A default implementation of
TagDescriptionGenerator.
It just calls tagConfiguration.getDescription().- Since:
- 0.6.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateDescription(TagConfiguration tagConfiguration, Annotation annotation, Object value) Implement this method to generate the description for the given annotation and its value.
-
Constructor Details
-
DefaultTagDescriptionGenerator
public DefaultTagDescriptionGenerator()
-
-
Method Details
-
generateDescription
public String generateDescription(TagConfiguration tagConfiguration, Annotation annotation, Object value) Description copied from interface:TagDescriptionGeneratorImplement this method to generate the description for the given annotation and its value.Note that when the value of the annotation is an array and
IsTag.explodeArray()istrue, 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:
generateDescriptionin interfaceTagDescriptionGenerator- Parameters:
tagConfiguration- the configuration of the tag. The values typically correspond to theannotation. However, it is also possible to configure annotations to be tags usingJGivenConfiguration, in which case there is noIsTagannotation.annotation- the actual annotation that was used as a tag. Note that this can benullin 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
-