Class JavadocTag


  • public class JavadocTag
    extends java.lang.Object
    Represents a Javadoc tag. Provides methods to query what type of tag it is.
    • Constructor Summary

      Constructors 
      Constructor Description
      JavadocTag​(int line, int column, java.lang.String tag)
      Constructs the object.
      JavadocTag​(int line, int column, java.lang.String tag, java.lang.String firstArg)
      Constructs the object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canReferenceImports()
      Checks that the tag can contain references to imported classes.
      int getColumnNo()
      Gets column number.
      java.lang.String getFirstArg()
      Returns first argument.
      int getLineNo()
      Gets the line number.
      java.lang.String getTagName()
      Gets tag name.
      boolean isInheritDocTag()
      Checks that the tag is a 'inheritDoc' tag.
      boolean isParamTag()
      Checks that the tag is an 'param' tag.
      boolean isReturnTag()
      Checks that the tag is an 'return' tag.
      boolean isSeeOrInheritDocTag()
      Checks that the tag is a 'see' or 'inheritDoc' tag.
      boolean isThrowsTag()
      Checks that the tag is an 'throws' or 'exception' tag.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JavadocTag

        public JavadocTag​(int line,
                          int column,
                          java.lang.String tag,
                          java.lang.String firstArg)
        Constructs the object.
        Parameters:
        line - the line number of the tag
        column - the column number of the tag
        tag - the tag string
        firstArg - the tag argument
      • JavadocTag

        public JavadocTag​(int line,
                          int column,
                          java.lang.String tag)
        Constructs the object.
        Parameters:
        line - the line number of the tag
        column - the column number of the tag
        tag - the tag string
    • Method Detail

      • getTagName

        public java.lang.String getTagName()
        Gets tag name.
        Returns:
        the tag string
      • getFirstArg

        public java.lang.String getFirstArg()
        Returns first argument.
        Returns:
        the first argument. null if not set.
      • getLineNo

        public int getLineNo()
        Gets the line number.
        Returns:
        the line number
      • getColumnNo

        public int getColumnNo()
        Gets column number.
        Returns:
        the column number
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isReturnTag

        public boolean isReturnTag()
        Checks that the tag is an 'return' tag.
        Returns:
        whether the tag is an 'return' tag
      • isParamTag

        public boolean isParamTag()
        Checks that the tag is an 'param' tag.
        Returns:
        whether the tag is an 'param' tag
      • isThrowsTag

        public boolean isThrowsTag()
        Checks that the tag is an 'throws' or 'exception' tag.
        Returns:
        whether the tag is an 'throws' or 'exception' tag
      • isSeeOrInheritDocTag

        public boolean isSeeOrInheritDocTag()
        Checks that the tag is a 'see' or 'inheritDoc' tag.
        Returns:
        whether the tag is a 'see' or 'inheritDoc' tag
      • isInheritDocTag

        public boolean isInheritDocTag()
        Checks that the tag is a 'inheritDoc' tag.
        Returns:
        whether the tag is a 'inheritDoc' tag
      • canReferenceImports

        public boolean canReferenceImports()
        Checks that the tag can contain references to imported classes.
        Returns:
        whether the tag can contain references to imported classes