public enum JavadocTagInfo extends Enum<JavadocTagInfo>
This class was modeled after documentation located at javadoc and how to write.
Some of this documentation was a little incomplete (ex: valid placement of code, value, and literal tags).
Whenever an inconsistency was found the author's judgment was used.
For now, the number of required/optional tag arguments are not included
because some Javadoc tags have very complex rules for determining this
(ex: {@value}
tag).
Also, the isValidOn
method does not consider
classes defined in a local code block (method, init block, etc.).
>
修飾子とタイプ | クラスと説明 |
---|---|
static class |
JavadocTagInfo.Type
The Javadoc Type.
|
列挙型定数と説明 |
---|
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 . |
修飾子とタイプ | メソッドと説明 |
---|---|
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()
Gets the tag name.
|
String |
getText()
Gets the tag text.
|
JavadocTagInfo.Type |
getType()
Gets the Tag type defined by
Type . |
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.
|
static boolean |
isValidName(String aName)
Returns whether the provided name is for a valid tag.
|
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)
指定した名前を持つこの型の列挙型定数を返します。
|
static JavadocTagInfo[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final JavadocTagInfo AUTHOR
@author
.public static final JavadocTagInfo CODE
{@code}
.public static final JavadocTagInfo DOC_ROOT
{@docRoot}
.public static final JavadocTagInfo DEPRECATED
@deprecated
.public static final JavadocTagInfo EXCEPTION
@exception
.public static final JavadocTagInfo INHERIT_DOC
{@inheritDoc}
.public static final JavadocTagInfo LINK
{@link}
.public static final JavadocTagInfo LINKPLAIN
{@linkplain}
.public static final JavadocTagInfo LITERAL
{@literal}
.public static final JavadocTagInfo PARAM
@param
.public static final JavadocTagInfo RETURN
@return
.public static final JavadocTagInfo SEE
@see
.public static final JavadocTagInfo SERIAL
@serial
.public static final JavadocTagInfo SERIAL_DATA
@serialData
.public static final JavadocTagInfo SERIAL_FIELD
@serialField
.public static final JavadocTagInfo SINCE
@since
.public static final JavadocTagInfo THROWS
@throws
.public static final JavadocTagInfo VALUE
{@value}
.public static final JavadocTagInfo VERSION
@version
.public static JavadocTagInfo[] values()
for(JavadocTagInfo c: JavadocTagInfo.values()) System.out.println(c);
public static JavadocTagInfo valueOf(String name)
name返される列挙型定数の名前
- IllegalArgumentException指定された名前を持つ定数を
- この列挙型が持っていない場合NullPointerException引数がnullの場合
public abstract boolean isValidOn(DetailAST aAST)
For example: Given a call to
JavadocTag.RETURN
.
isValidOn(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.
aAST
- the AST representing a type that can be Javadoc'dpublic boolean isValidInPackageHtml()
public boolean isValidInOverviewHtml()
public String getText()
public String getName()
public JavadocTagInfo.Type getType()
Type
.public static JavadocTagInfo fromText(String aText)
aText
- String representing the tag textNullPointerException
- if the text is nullIllegalArgumentException
- if the text is not a valid tagpublic static JavadocTagInfo fromName(String aName)
aName
- String name of the tagNullPointerException
- if the text is nullIllegalArgumentException
- if the text is not a valid tag. The name
can be checked using isValidName(String)
public static boolean isValidName(String aName)
aName
- the tag name to check.public String toString()
toString
クラス内 Enum<JavadocTagInfo>
Copyright © 2001-2013. All Rights Reserved.