T - wrapped body declaration typepublic abstract class ASTJMember<T extends BodyDeclaration> extends ASTJNode<T> implements JMember
ASTJMember has a reference to BodyDeclaration as a wrapped object.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
comment
Cached value of member comment.
|
isCommentedOut, name, rewriter, UNITIALIZED_STRINGEMPTY_STRING_ARRAY, qualifiedName| Constructor and Description |
|---|
ASTJMember(T bodyDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addChild(ASTJNode<?> child)
Adds a child to this node.
|
void |
dispose() |
protected java.util.List<JNode> |
getAnnotationList() |
java.util.List<JNode> |
getChildren()
Returns the children of this node.
|
java.lang.String |
getComment()
Returns the comment associated with this member (including comment delimiters).
|
int |
getFlags()
Returns original flags of the member.
|
protected void |
insertLastAnnotation(ASTJAnnotation annotation)
Insert annotation after the last annotation of the given body declaration.
|
boolean |
insertSibling(ASTJNode<?> node,
ASTJNode<?> newSibling,
boolean before)
Inserts
newSibling as a child of this node before or after the given node. |
boolean |
remove(ASTJNode<?> node)
Removes a node.
|
void |
setComment(java.lang.String comment)
Sets the comment associated with this member.
|
void |
setFlags(int flags)
Sets the flags of the member.
|
addValueToListProperty, addValueToListProperty, ancestorInserted, ancestorToBeRemoved, childToBeChanged, combineArrayAndList, commentOut, convertASTNodeListToStringArray, disableTrackAndReplace, enableTrackAndReplace, getASTNode, getContents, getFacadeHelper, getParent, getRemovedASTNode, getRewriter, getWrappedObject, insert, insertFirst, insertLast, isDisposed, nodeToBeMoved, nodeToBeRemoved, remove, removeNodeFromListProperty, removeTrackAndReplace, setASTNode, setFacadeHelper, setListNodeProperty, setNodeProperty, setNodeProperty, setParent, setRemovedASTNode, setRewriter, setTrackedNodeProperty, setWrappedObject, trackAndReplacecomputeQualifiedName, computeQualifiedName, computeQualifiedName, computeQualifiedName, getName, getQualifiedNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContents, getName, getParent, getQualifiedName, setNameprotected java.lang.String comment
getComment(),
setComment(String)public ASTJMember(T bodyDeclaration)
bodyDeclaration - public int getFlags()
getFlags in interface JNodegetFlags in class AbstractJNodeAbstractJNode.getFlags()public void setFlags(int flags)
Note that getFlags() will not return the new value.
public java.lang.String getComment()
JMembergetComment in interface JMembernull if this member has no associated
commentpublic void setComment(java.lang.String comment)
JMembernull comment indicates no comment.setComment in interface JMembercomment - the comment, including comment delimiters, or
null indicating this member should have no associated commentpublic boolean remove(ASTJNode<?> node)
ASTJNode
Default implementation does nothing and returns false.
public boolean insertSibling(ASTJNode<?> node, ASTJNode<?> newSibling, boolean before)
ASTJNodenewSibling as a child of this node before or after the given node.
Default implementation does nothing and returns false.
insertSibling in class ASTJNode<T extends BodyDeclaration>newSibling - to insertbefore - true if newSibling must be before node, false if aftertrue if operation successful, false otherwisepublic boolean addChild(ASTJNode<?> child)
ASTJNode
Default implementation does nothing and returns false.
public java.util.List<JNode> getChildren()
JNodeThe list must be unmodifiable if the implementation doesn't support direct manipulation.
getChildren in interface JNodegetChildren in class AbstractJNodeprotected java.util.List<JNode> getAnnotationList()
protected void insertLastAnnotation(ASTJAnnotation annotation)
Note that modifiers and annotations can alternate in the modifiers list. This method inserts the new annotation after the last existing annotation.
annotation - Copyright © 2019. Licensed under the Eclipse Public License v2.0. All rights reserved.
Submit a bug or feature