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

Comment (Java Source) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.java.source 0.13.0 1

org.netbeans.api.java.source
Class Comment

java.lang.Object
  extended by org.netbeans.api.java.source.Comment

public final class Comment
extends Object

An individual comment, consisting of a style, begin and end source file position, the indention (column) of its first character, and its text.


Nested Class Summary
static class Comment.Style
          The set of different comment types.
 
Method Summary
static Comment create(Comment.Style style, int pos, int endPos, int indent, String text)
           
static Comment create(String s)
          Define a new block comment from a string.
 int endPos()
          The end position in the source file, or Query.NOPOS if the comment was added by a translation operation.
 boolean equals(Object obj)
           
 String getText()
          Returns the comment text.
 int hashCode()
           
 int indent()
          Returns the line indention for this comment, or Query.NOPOS if the comment was added by a translation operation.
 boolean isDocComment()
          Returns true if this is a JavaDoc comment.
 boolean isNew()
           
 int pos()
          The start position in the source file, or Query.NOPOS if the comment was added by a translation operation.
 Comment.Style style()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Comment create(String s)
Define a new block comment from a string. This comment does not have source file positions.


create

public static Comment create(Comment.Style style,
                             int pos,
                             int endPos,
                             int indent,
                             String text)

style

public Comment.Style style()

pos

public int pos()
The start position in the source file, or Query.NOPOS if the comment was added by a translation operation.


endPos

public int endPos()
The end position in the source file, or Query.NOPOS if the comment was added by a translation operation.


indent

public int indent()
Returns the line indention for this comment, or Query.NOPOS if the comment was added by a translation operation.


isDocComment

public boolean isDocComment()
Returns true if this is a JavaDoc comment.


getText

public String getText()
Returns the comment text.


isNew

public boolean isNew()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

org.netbeans.modules.java.source 0.13.0 1

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