站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.0

JavaDoc (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.5.0

org.openide.src 1.8.22

org.openide.src
Interface JavaDoc

All Known Subinterfaces:
JavaDoc.Class, JavaDoc.Field, JavaDoc.Method

public interface JavaDoc

Represents a JavaDoc comment block. The representation object is mutable, if it represents a portion of a source text, any changes made to the object are reflected in the source code and vice versa.
There are a few inerclasses, which subclass JavaDoc class, and add accessors for tags specific to individual source text elements.


Nested Class Summary
static interface JavaDoc.Class
          The JavaDoc of a class.
static interface JavaDoc.Field
          The JavaDoc of a field.
static interface JavaDoc.Method
          The JavaDoc of a method.
 
Field Summary
static int ADD
          Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).
static int REMOVE
          Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).
static int SET
          Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).
 
Method Summary
 void changeTags(JavaDocTag[] tags, int action)
          Adds removes or sets tags used in this comment
 void clearJavaDoc()
          Clears the javadoc from the source.
 String getRawText()
          Get the entire text of the comment.
 JavaDocTag.See[] getSeeTags()
          Gets all @see tags
 JavaDocTag[] getTags()
          Gets all tags from comment.
 JavaDocTag[] getTags(String name)
          Gets all tags of given name
 String getText()
          Get the actual text, cleared of all (non-inline) tags.
 boolean isEmpty()
          Test if this javadoc is empty.
 void setRawText(String s)
          Set the raw text of the comment.
 void setText(String s)
          Set the actual text.
 

Field Detail

ADD

static final int ADD
Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).

See Also:
Constant Field Values

REMOVE

static final int REMOVE
Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).

See Also:
Constant Field Values

SET

static final int SET
Serves as second parameter in method changeTags(org.openide.src.JavaDocTag[], int).

See Also:
Constant Field Values
Method Detail

getRawText

String getRawText()
Get the entire text of the comment. If the javadoc comment is empty (except the boxing stars), it returns an empty string. If the comment is missing at all, the method returns null (isEmpty() returns true at the same time).

Returns:
the whole text, or null, if the comment is missing at all on the Element.

setRawText

void setRawText(String s)
                throws SourceException
Set the raw text of the comment.

Parameters:
s - the whole text to set
Throws:
SourceException - if the modification cannot be performed

getText

String getText()
Get the actual text, cleared of all (non-inline) tags.

Returns:
the plain text

setText

void setText(String s)
             throws SourceException
Set the actual text.

Parameters:
s - the actual text, without any (non-inline) tags
Throws:
SourceException - if the modification cannot be performed

clearJavaDoc

void clearJavaDoc()
                  throws SourceException
Clears the javadoc from the source.

Throws:
SourceException

isEmpty

boolean isEmpty()
Test if this javadoc is empty.

Returns:
true if it is not generated to the source.

getTags

JavaDocTag[] getTags()
Gets all tags from comment.


getTags

JavaDocTag[] getTags(String name)
Gets all tags of given name


changeTags

void changeTags(JavaDocTag[] tags,
                int action)
                throws SourceException
Adds removes or sets tags used in this comment

Parameters:
tags - the new initializers
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getSeeTags

JavaDocTag.See[] getSeeTags()
Gets all @see tags


org.openide.src 1.8.22

Built on May 28 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.