com.puppycrawl.tools.checkstyle.api
Enum JavadocTagInfo

java.lang.Object
  extended by java.lang.Enum<JavadocTagInfo>
      extended by com.puppycrawl.tools.checkstyle.api.JavadocTagInfo
All Implemented Interfaces:
Serializable, Comparable<JavadocTagInfo>

public enum JavadocTagInfo
extends Enum<JavadocTagInfo>

Author:
Travis Schneeberger

Nested Class Summary
static class JavadocTagInfo.Type
          The Javadoc Type.
 
Enum Constant Summary
AUTHOR
           @author
CODE
           @code}
DEPRECATED
           @deprecated
DOC_ROOT
           @docRoot}
EXCEPTION
           @exception
INHERIT_DOC
           @inheritDoc}
LINK
           @link}
LINKPLAIN
           @linkplain}
LITERAL
           @literal}
PARAM
           @param
RETURN
           @return
SEE
           @see
SERIAL
           @serial
SERIAL_DATA
           @serialData
SERIAL_FIELD
           @serialField
SINCE
           @since
THROWS
           @throws
VALUE
           @value}
VERSION
           @version
 
Method Summary
static JavadocTagInfo fromName(String aName)
          returns a JavadocTag from the tag name.
static JavadocTagInfo fromText(String aText)
          returns a JavadocTag from the tag text.
 String getName()
           
 String getText()
           
 JavadocTagInfo.Type getType()
           
 boolean isValidInOverviewHtml()
          Checks if tag is valid in a overview.html Javadoc file.
 boolean isValidInPackageHtml()
          Checks if tag is valid in a package.html Javadoc file.
abstract  boolean isValidOn(DetailAST aAST)
          Checks if a particular Javadoc tag is valid within a Javadoc block of a given AST.
 String toString()
          
static JavadocTagInfo valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JavadocTagInfo[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTHOR

public static final JavadocTagInfo AUTHOR
 @author
 
.


CODE

public static final JavadocTagInfo CODE
 @code}
 
.


DOC_ROOT

public static final JavadocTagInfo DOC_ROOT
 @docRoot}
 
.


DEPRECATED

public static final JavadocTagInfo DEPRECATED
 @deprecated
 
.


EXCEPTION

public static final JavadocTagInfo EXCEPTION
 @exception
 
.


INHERIT_DOC

public static final JavadocTagInfo INHERIT_DOC
 @inheritDoc}
 
.


LINK

public static final JavadocTagInfo LINK
 @link}
 
.


LINKPLAIN

public static final JavadocTagInfo LINKPLAIN
 @linkplain}
 
.


LITERAL

public static final JavadocTagInfo LITERAL
 @literal}
 
.


PARAM

public static final JavadocTagInfo PARAM
 @param
 
.


RETURN

public static final JavadocTagInfo RETURN
 @return
 
.


SEE

public static final JavadocTagInfo SEE
 @see
 
.


SERIAL

public static final JavadocTagInfo SERIAL
 @serial
 
.


SERIAL_DATA

public static final JavadocTagInfo SERIAL_DATA
 @serialData
 
.


SERIAL_FIELD

public static final JavadocTagInfo SERIAL_FIELD
 @serialField
 
.


SINCE

public static final JavadocTagInfo SINCE
 @since
 
.


THROWS

public static final JavadocTagInfo THROWS
 @throws
 
.


VALUE

public static final JavadocTagInfo VALUE
 @value}
 
.


VERSION

public static final JavadocTagInfo VERSION
 @version
 
.

Method Detail

values

public static final JavadocTagInfo[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(JavadocTagInfo c : JavadocTagInfo.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static JavadocTagInfo valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

isValidOn

public abstract boolean isValidOn(DetailAST aAST)
Checks if a particular Javadoc tag is valid within a Javadoc block of a given AST.

For example: Given a call to JavadocTag.RETURNisValidOn(DetailAST).

If passing in a DetailAST representing a non-void METHOD_DEF true would be returned. If passing in a DetailAST representing a CLASS_DEF false would be returned because CLASS_DEF's cannot return a value.

Parameters:
aAST - the AST representing a type that can be Javadoc'd
Returns:
true if tag is valid.

isValidInPackageHtml

public boolean isValidInPackageHtml()
Checks if tag is valid in a package.html Javadoc file.

Returns:
true if tag is valid.

isValidInOverviewHtml

public boolean isValidInOverviewHtml()
Checks if tag is valid in a overview.html Javadoc file.

Returns:
true if tag is valid.

getText

public String getText()
Returns:
the tag text

getName

public String getName()
Returns:
the tag name

getType

public JavadocTagInfo.Type getType()
Returns:
the Tag type defined by Type.

fromText

public static JavadocTagInfo fromText(String aText)
returns a JavadocTag from the tag text.

Parameters:
aText - String representing the tag text
Returns:
Returns a JavadocTag type from a String representing the tag
Throws:
NullPointerException - if the text is null
IllegalArgumentException - if the text is not a valid tag

fromName

public static JavadocTagInfo fromName(String aName)
returns a JavadocTag from the tag name.

Parameters:
aName - String name of the tag
Returns:
Returns a JavadocTag type from a String representing the tag
Throws:
NullPointerException - if the text is null
IllegalArgumentException - if the text is not a valid tag

toString

public String toString()

Overrides:
toString in class Enum<JavadocTagInfo>

Back to the Checkstyle Home Page