Class JavadocTag
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTag
Represents a Javadoc tag. Provides methods to query what type of tag it is.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavadocTag(int line, int column, String tag) Constructs the object.JavadocTag(int line, int column, String tag, String firstArg) Constructs the object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks that the tag can contain references to imported classes.intGets column number.Returns first argument.intGets the line number.Gets tag name.booleanChecks that the tag is a 'inheritDoc' tag.booleanChecks that the tag is a inline tag.booleanChecks that the tag is an 'param' tag.booleanChecks that the tag is an 'return' tag.booleanChecks that the tag is a 'see' or 'inheritDoc' tag.booleanChecks that the tag is an 'throws' or 'exception' tag.toString()
-
Field Details
-
lineNo
The line number of the tag. -
columnNo
The column number of the tag. -
firstArg
An optional first argument. For example the parameter name. -
tagInfo
The JavadocTagInfo representing this tag.
-
-
Constructor Details
-
JavadocTag
Constructs the object.- Parameters:
line- the line number of the tagcolumn- the column number of the tagtag- the tag stringfirstArg- the tag argument
-
JavadocTag
Constructs the object.- Parameters:
line- the line number of the tagcolumn- the column number of the tagtag- the tag string
-
-
Method Details
-
getTagName
Gets tag name.- Returns:
- the tag string
-
getFirstArg
Returns first argument.- Returns:
- the first argument. null if not set.
-
getLineNo
Gets the line number.- Returns:
- the line number
-
getColumnNo
Gets column number.- Returns:
- the column number
-
toString
-
isReturnTag
Checks that the tag is an 'return' tag.- Returns:
- whether the tag is an 'return' tag
-
isParamTag
Checks that the tag is an 'param' tag.- Returns:
- whether the tag is an 'param' tag
-
isThrowsTag
Checks that the tag is an 'throws' or 'exception' tag.- Returns:
- whether the tag is an 'throws' or 'exception' tag
-
isSeeOrInheritDocTag
Checks that the tag is a 'see' or 'inheritDoc' tag.- Returns:
- whether the tag is a 'see' or 'inheritDoc' tag
-
isInheritDocTag
Checks that the tag is a 'inheritDoc' tag.- Returns:
- whether the tag is a 'inheritDoc' tag
-
canReferenceImports
Checks that the tag can contain references to imported classes.- Returns:
- whether the tag can contain references to imported classes
-
isInlineTag
Checks that the tag is a inline tag.- Returns:
- whether the tag is a inline tag
-