|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface IsTag
Marks an annotation to be used as a tag in JGiven reports. The name and a possible value will be stored. A value can be an array in which case it is either translated into multiple tags, one for each array element, or a comma-separated list of values.
Note that the annotation must have retention policy RUNTIME
@IsTag @Retention( RetentionPolicy.RUNTIME ) public @interface Issue { String[] value(); }
Optional Element Summary | |
---|---|
java.lang.String |
color
A color that should be used in reports for this tag. |
java.lang.String |
cssClass
Sets a CSS class that should be used in the HTML report for this tag. |
java.lang.String |
description
An optional description of the tag that will appear in the generated report. |
java.lang.Class<? extends TagDescriptionGenerator> |
descriptionGenerator
An optional description generator that is used to dynamically generate the description depending on the concrete value of an annotation. |
boolean |
explodeArray
If the annotation has a value and the value is an array, whether or not to explode that array to multiple tags or not. |
boolean |
ignoreValue
Whether values should be ignored. |
java.lang.String |
name
An optional name that overrides the default which is the name of the annotation. |
boolean |
prependType
Whether the type should be prepended to the tag if the tag has a value. |
java.lang.String |
style
Defines an inline style that is used in the HTML report for this tag. |
java.lang.String |
type
Deprecated. use name() instead |
java.lang.String |
value
An optional default value for the tag. |
public abstract boolean explodeArray
@Issue( { "#23", "#12" } )When
explodeArray
is set to true
Then in the report there will be two tags 'Issue-#23' and 'Issue-#12'
instead of one tag 'Issue-#23,#12'
public abstract boolean ignoreValue
Pending
public abstract java.lang.String value
public abstract java.lang.String description
public abstract java.lang.Class<? extends TagDescriptionGenerator> descriptionGenerator
The class that implements TagDescriptionGenerator
interface must
be a public non-abstract class that is not a non-static inner class and must have a public default constructor.
If this attribute is set, the description()
attribute is ignored.
@Deprecated public abstract java.lang.String type
name()
instead
public abstract java.lang.String name
It is possible that multiple annotations have the same type name. However, in this case every annotation must have a specified value that must be unique.
public abstract boolean prependType
public abstract java.lang.String cssClass
The default CSS class is 'tag-<name>'
where <name>
is the type of the tag
Non-HTML reports ignore this attribute
public abstract java.lang.String color
It depends on the type of the report whether and how this value is interpreted. HTML reports take this value as the background color for the tag.
Example values for the HTML report are 'red', '#ff0000', 'rgba(100,0,0,0.5)'
This attribute is for simple use cases.
For advanced styling options use the cssClass()
or style()
attributes instead.
public abstract java.lang.String style
This is an alternative to the cssClass()
attribute.
style = "background-color: red; color: white;"
Non-HTML reports ignore this attribute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |