public class ASTJEnum extends ASTJAbstractType<EnumDeclaration> implements JEnum
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.String> |
addedSuperInterfaces
List of added interfaces by calling
addSuperInterface(String) . |
protected java.lang.String[] |
superInterfaces
Array of cached super interfaces.
|
comment
isCommentedOut, name, rewriter, UNITIALIZED_STRING
EMPTY_STRING_ARRAY, qualifiedName
Constructor and Description |
---|
ASTJEnum(EnumDeclaration enumDeclaration) |
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(ASTJNode<?> child)
Adds a child to this node.
|
void |
addSuperInterface(java.lang.String superInterface)
Adds an interface to the list of interfaces.
|
void |
dispose() |
java.util.List<JNode> |
getChildren()
Returns the list of children.
|
protected java.util.List<JNode> |
getEnumConstants() |
java.lang.String[] |
getSuperInterfaces()
Returns ordered array of super interfaces as declared in source
in "implements" clause.
|
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 the node.
|
void |
setSuperInterfaces(java.lang.String[] superInterfaces)
Sets ordered super interfaces array of super interfaces to the given
array.
|
computeQualifiedName, getMembers, getName, setName
getAnnotationList, getComment, getFlags, insertLastAnnotation, setComment, setFlags
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, trackAndReplace
computeQualifiedName, computeQualifiedName, computeQualifiedName, getName, getQualifiedName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComment, setComment
getContents, getFlags, getName, getParent, getQualifiedName, setFlags, setName
protected java.util.List<java.lang.String> addedSuperInterfaces
addSuperInterface(String)
.
This list does not include existing interfaces, nor interfaces set by setSuperInterfaces(String[])
protected java.lang.String[] superInterfaces
addedSuperInterfaces
.public ASTJEnum(EnumDeclaration enumDeclaration)
enumDeclaration
- public void dispose()
dispose
in class ASTJMember<EnumDeclaration>
public void addSuperInterface(java.lang.String superInterface)
JEnum
addSuperInterface
in interface JEnum
public java.lang.String[] getSuperInterfaces()
JEnum
getSuperInterfaces
in interface JEnum
public void setSuperInterfaces(java.lang.String[] superInterfaces)
JEnum
setSuperInterfaces
in interface JEnum
public boolean insertSibling(ASTJNode<?> node, ASTJNode<?> newSibling, boolean before)
ASTJNode
newSibling
as a child of this node before or after the given node
.
Default implementation does nothing and returns false
.
insertSibling
in class ASTJAbstractType<EnumDeclaration>
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
.
addChild
in class ASTJAbstractType<EnumDeclaration>
child
- to addtrue
if operation successful, false
otherwisepublic boolean remove(ASTJNode<?> node)
ASTJAbstractType
This implementation supports moving the nodes by calling ASTJAbstractType.remove(ASTJNode)
and
then ASTJAbstractType.insertSibling(ASTJNode, ASTJNode, boolean)
or ASTJAbstractType.addChild(ASTJNode)
.
remove
in class ASTJAbstractType<EnumDeclaration>
node
- must be a child of this nodetrue
if operation successful, false
otherwiseASTJNode.remove(ASTJNode)
public java.util.List<JNode> getChildren()
ASTJAbstractType
getChildren
in interface JNode
getChildren
in class ASTJAbstractType<EnumDeclaration>
FacadeHelper.convertToNode(Object)
,
AbstractJNode.getChildren()
protected java.util.List<JNode> getEnumConstants()