JavaComment Class
- public class JavaComment
extends JavaElement
JavaComment is a DefaultSourceElement derivation that represents a java comment block.
This object type is used for all comments, whether specified by //
,
/*
, or /**
.
JavaClass objects may contain children of type JavaDocTag
.
The properties available on an object of this type may be found by looking at the
getDefaultPropertyDescriptors
method.
All java parse tree objects are instantiated as part of parse tree
construction by the JavaBuilder
class.
-
Hierarchy
-
Object
DefaultElement
DefaultTreeElement
DefaultDocumentElement
DefaultSourceElement
JavaElement
JavaComment
-
All Implemented Interfaces
-
IDocumentElement
, IElement
, ISourceElement
, IStructureFeature.IStructureNode
, ITreeElement
public Position |
-
m_endComment
- The end offset of this comment, less than
getRange().getEnd() because this position doesn't
include the end-comment token.
|
public Position |
-
m_startComment
- The start offset of this comment, greater than
getRange().getStart() because this position doesn't
include the open-comment token.
|
-
JavaComment()
- Creates a new object containing a null cookie.
|
-
JavaComment(
Object compilerCookie)
- Creates a new object containing the specified cookie.
|
Methods from com.bea.ide.sourceeditor.element.DefaultSourceElement |
addChild , createAuthorNode , debugDump , equals , getChildrenByClass , getClassLoader , getCookie , getDiagnostics , getGroup , getInstanceName , getProperty , getPropertyCode , getPropertyDescriptors , getPropertySourceRange , getPropertySourceRanges , getPropertySourceText , getPropertySourceText , getRange , getRange , getRangePrefetchProperties , getStatus , initializeRange , insertChild , isAuthorProperty , markRemovedFromTree , mergeElements , propertyModified , removeChild , removeChild , replaceChild , requestAddChild , requestAddChild , requestRemoveChild , requestSetProperty , setProperty , setStatus
|
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods from interface com.bea.ide.sourceeditor.element.ISourceElement |
createAuthorNode , getCookie , getDiagnostics , getPropertyCode , getRange , getStatus , mergeFrom , requestAddChild , requestAddChild , requestRemoveChild , requestSetProperty
|
m_endComment
public Position
m_endComment
- The end offset of this comment, less than
getRange().getEnd()
because this position doesn't
include the end-comment token.
m_startComment
public Position
m_startComment
- The start offset of this comment, greater than
getRange().getStart()
because this position doesn't
include the open-comment token.
JavaComment
public JavaComment()
- Creates a new object containing a null cookie. This constructor should be used by callers constructing objects
that are not part of an active parse tree, such as those to be added via two-way edit.
JavaComment
public JavaComment(Object
compilerCookie)
- Creates a new object containing the specified cookie. This constructor should only be called by
ILanguageBuilder
implementations.
getDefaultPropertyDescriptors() Method
public DefaultSourceElement.CompilerPropertyDescriptor
[] getDefaultPropertyDescriptors()
Description copied from DefaultSourceElement.getDefaultPropertyDescriptors()
DefaultSourceElement subclasses define their set of available CompilerPropertyDescriptor objects by implementing
this method.
-
Overrides
-
DefaultSourceElement.getDefaultPropertyDescriptors()
Returns
- an array of CompilerPropertyDescriptor objects
getTypeCode() Method
public IStructureFeature.StructureCode
getTypeCode()
This method returns a code used by the compiler to identify the type of this element.
This method should not be called directly, since the return value isn't useful outside
of the compiler.
-
Overrides
-
DefaultSourceElement.getTypeCode()
Returns
- A compiler structure code identifying the type of this element.
getValue() Method
public String
getValue()
Returns the text of this comment.
initializeRange(IStructureFeature, ISourceModel) Method
protected void initializeRange(IStructureFeature
structureFeature,
ISourceModel
model)
Description copied from DefaultSourceElement.initializeRange(IStructureFeature, ISourceModel)
Converts compiler provided range information into source model sticky positions.
This method assumes it is run on the AWT thread.
-
Overrides
-
DefaultSourceElement.initializeRange(IStructureFeature, ISourceModel)
mergeFrom(ISourceElement) Method
public void mergeFrom(ISourceElement
sourceElement)
Description copied from ISourceElement.mergeFrom(ISourceElement)
Merges the contents of one source element into the this source element, firing property change events as
appropriate. The elements must be of compatible types. This method is used on an element-by-element basis
when merging a new parse tree into an existing tree. After the merge,
this.equals(sourceElement)
will return true while this ==
sourceElement
will return false. Note that this method has no effect on the children of the source or
destination elements: it only applies to element properties.
-
Overrides
-
DefaultSourceElement.mergeFrom(ISourceElement)
setValue(String) Method
public void setValue(String
value)
Sets the text of this comment.
visit(JavaVisitor, Object) Method
public Object
visit(JavaVisitor
v,
Object
arg)
Provides JavaVisitor
support for this element type.
-
Overrides
-
JavaElement.visit(JavaVisitor, Object)
Parameters
-
v
- The visitor
-
arg
- An argument to the visit, to be interpreted by the visitor.
Returns
- Object returned by the visitor.