public abstract class AbstractMojoTaglet
extends java.lang.Object
implements com.sun.tools.doclets.Taglet
Taglet
for Maven Mojo annotations.
@annotation <annotationValue> <parameterName="parameterValue">
Constructor and Description |
---|
AbstractMojoTaglet() |
Modifier and Type | Method and Description |
---|---|
private static void |
appendAnnotationParameters(java.lang.StringBuilder sb,
javax.swing.text.MutableAttributeSet att)
Append the annotation parameters as a definition list.
|
private void |
appendTag(java.lang.StringBuilder sb,
com.sun.javadoc.Tag tag,
javax.swing.text.MutableAttributeSet tagAttributes,
java.lang.String tagValue)
Append a tag
|
abstract java.lang.String[] |
getAllowedParameterNames() |
abstract java.lang.String |
getAllowedValue() |
abstract java.lang.String |
getHeader() |
private static java.util.List<java.lang.String> |
getOnlyValues(java.lang.String text)
Splits the provided text into a array, using pipe as the separator.
|
private javax.swing.text.MutableAttributeSet |
getTagAttributes(com.sun.javadoc.Tag tag) |
private java.lang.String |
getTagValue(com.sun.javadoc.Tag tag) |
boolean |
hasAnnotationParameters() |
boolean |
hasAnnotationValue() |
private static boolean |
isEmpty(java.lang.String str)
Checks if a (trimmed) String is
null or empty. |
private static boolean |
isEveryValues(java.lang.String text) |
private static boolean |
isNotEmpty(java.lang.String str)
Checks if a String is non
null and is
not empty (length > 0 ). |
java.lang.String |
toString(com.sun.javadoc.Tag tag) |
java.lang.String |
toString(com.sun.javadoc.Tag[] tags) |
public java.lang.String toString(com.sun.javadoc.Tag tag)
toString
in interface com.sun.tools.doclets.Taglet
public java.lang.String toString(com.sun.javadoc.Tag[] tags)
toString
in interface com.sun.tools.doclets.Taglet
public abstract java.lang.String getHeader()
public abstract java.lang.String getAllowedValue()
null
if the given Mojo annotation/tag does't allow
annotation value.
*
for every values, a|b|c
for a OR b OR c
.public abstract java.lang.String[] getAllowedParameterNames()
null
if the annotation/tag doesn't allow parameter.public boolean hasAnnotationValue()
true
if taglet has annotation value, false
otherwise.getAllowedValue()
public boolean hasAnnotationParameters()
true
if taglet has parameters, false
otherwise.getAllowedParameterNames()
private java.lang.String getTagValue(com.sun.javadoc.Tag tag)
tag
- not null.null
if no annotation value was found.private javax.swing.text.MutableAttributeSet getTagAttributes(com.sun.javadoc.Tag tag)
tag
- not null.private void appendTag(java.lang.StringBuilder sb, com.sun.javadoc.Tag tag, javax.swing.text.MutableAttributeSet tagAttributes, java.lang.String tagValue)
sb
- not nulltag
- not nulltagAttributes
- not nulltagValue
- not nullprivate static void appendAnnotationParameters(java.lang.StringBuilder sb, javax.swing.text.MutableAttributeSet att)
sb
- not nullatt
- not nullprivate static boolean isEveryValues(java.lang.String text)
text
- not nulltrue
if text contains *
, false
otherwise.private static java.util.List<java.lang.String> getOnlyValues(java.lang.String text)
text
- not nullCollections.EMPTY_LIST
.
By convention, the default value is the first element.private static boolean isNotEmpty(java.lang.String str)
Checks if a String is non null
and is
not empty (length > 0
).
str
- the String to checkprivate static boolean isEmpty(java.lang.String str)
Checks if a (trimmed) String is null
or empty.
str
- the String to checktrue
if the String is null
, or
length zero once trimmed