public class CtCommentImpl extends CtStatementImpl implements CtComment
CtComment.CommentType
Modifier and Type | Field and Description |
---|---|
protected String |
content |
ERROR_MESSAGE_TO_STRING, LOGGER, parent
LINE_SEPARATOR
Modifier | Constructor and Description |
---|---|
|
CtCommentImpl() |
protected |
CtCommentImpl(CtComment.CommentType type) |
Modifier and Type | Method and Description |
---|---|
<E extends CtComment> |
_setRawContent(String content)
FOR ADVANCED USAGE ONLY
Set the comment content, without cleaning the comment, if the cleaning behavior to get a canonical version does not work for you.
|
void |
accept(CtVisitor visitor)
Accepts a visitor
|
CtJavaDoc |
asJavaDoc()
Utility method to for casting the object, throws an exception if not of the correct type
|
CtComment |
clone()
Clone the element which calls this method in a new object.
|
boolean |
equals(Object o)
The comments are not printed during the CtElement equality.
|
CtComment.CommentType |
getCommentType()
Get the type of the comment
|
String |
getContent()
Get the content of the comment
|
String |
getRawContent() |
int |
hashCode() |
<E extends CtComment> |
setCommentType(CtComment.CommentType commentType) |
<E extends CtComment> |
setContent(String content) |
getLabel, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, setLabel
partiallyEvaluate
addAnnotation, addComment, asIterable, delete, descendantIterator, emptyList, emptySet, filterChildren, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getFactory, getMetadata, getMetadataKeys, getOriginalSourceFragment, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, map, map, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setFactory, setImplicit, setParent, setPosition, setPositions, setValueByRole, toString, unmodifiableList, updateAllParentsBelow
finalize, getClass, notify, notifyAll, wait, wait, wait
getLabel, insertAfter, insertAfter, insertBefore, insertBefore, setLabel
partiallyEvaluate
addAnnotation, addComment, asIterable, delete, descendantIterator, getAllMetadata, getAnnotatedChildren, getAnnotation, getAnnotation, getAnnotations, getComments, getDirectChildren, getDocComment, getElements, getMetadata, getMetadataKeys, getParent, getParent, getParent, getPath, getPosition, getReferencedTypes, getRoleInParent, getShortRepresentation, getValueByRole, hasAnnotation, hasParent, isImplicit, isParentInitialized, putMetadata, removeAnnotation, removeComment, replace, replace, setAllMetadata, setAnnotations, setComments, setDocComment, setImplicit, setParent, setPosition, setPositions, setValueByRole, updateAllParentsBelow
getFactory, setFactory
filterChildren, map, map
getOriginalSourceFragment
protected String content
public CtCommentImpl()
protected CtCommentImpl(CtComment.CommentType type)
public String getContent()
CtComment
getContent
in interface CtComment
public String getRawContent()
getRawContent
in interface CtComment
CtComment.setContent(String)
doesn't influence the returned value, only the value of the position object.public <E extends CtComment> E setContent(String content)
setContent
in interface CtComment
public <E extends CtComment> E _setRawContent(String content)
public CtComment.CommentType getCommentType()
CtComment
getCommentType
in interface CtComment
public <E extends CtComment> E setCommentType(CtComment.CommentType commentType)
setCommentType
in interface CtComment
public void accept(CtVisitor visitor)
CtVisitable
accept
in interface CtVisitable
public boolean equals(Object o)
equals
in class CtElementImpl
public int hashCode()
hashCode
in class CtElementImpl
public CtComment clone()
CtElement
Refactoring.copyType(CtType)
and Refactoring.copyMethod(CtMethod)
instead which does additional work beyond cloning.clone
in interface CtCodeElement
clone
in interface CtComment
clone
in interface CtStatement
clone
in interface CtElement
clone
in class CtStatementImpl
Copyright © 2007–2019 Inria. All rights reserved.