org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTJAbstractType<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
java.lang.Object
org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode<T>
org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember<T>
org.eclipse.emf.codegen.merge.java.facade.ast.ASTJAbstractType<T>
- Type Parameters:
T - wrapped AST AbstractType
- All Implemented Interfaces:
- JAbstractType, JMember, JNode
- Direct Known Subclasses:
- ASTJAnnotationType, ASTJEnum, ASTJType
public abstract class ASTJAbstractType<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
- extends ASTJMember<T>
- implements JAbstractType
| Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember |
comment |
| Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASTJAbstractType
protected ASTJAbstractType(T abstractTypeDeclaration)
getName
public java.lang.String getName()
- Description copied from interface:
JNode
- Returns the name of this node.
- Specified by:
getName in interface JNode
- Returns:
- the name, or
null if it has no name
setName
public void setName(java.lang.String name)
- Description copied from interface:
JNode
- Sets the name of this node. If the name is used to match the nodes
to be merged, it is highly recommended not to use this method.
- Specified by:
setName in interface JNode
- See Also:
JNode.getQualifiedName()
computeQualifiedName
protected java.lang.String computeQualifiedName()
- Overrides:
computeQualifiedName in class AbstractJNode
getChildren
public java.util.List<JNode> getChildren()
- Returns the list of children.
- Specified by:
getChildren in interface JNode- Overrides:
getChildren in class ASTJMember<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
- Returns:
- a list of the children
- See Also:
FacadeHelper.convertToNode(Object),
AbstractJNode.getChildren()
addChild
public boolean addChild(ASTJNode<?> child)
- Description copied from class:
ASTJNode
- Adds a child to this node.
Default implementation does nothing and returns false.
- Overrides:
addChild in class ASTJMember<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
- Parameters:
child - to add
- Returns:
true if operation successful, false otherwise
insertSibling
public boolean insertSibling(ASTJNode<?> node,
ASTJNode<?> newSibling,
boolean before)
- Description copied from class:
ASTJNode
- Inserts
newSibling as a child of this node before or after the given node.
Default implementation does nothing and returns false.
- Overrides:
insertSibling in class ASTJMember<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
newSibling - to insertbefore - true if newSibling must be before node, false if after
- Returns:
true if operation successful, false otherwise
remove
public boolean remove(ASTJNode<?> node)
- Removes the node. Node must be a child of ASTJType.
This implementation supports moving the nodes by calling remove(ASTJNode) and
then insertSibling(ASTJNode, ASTJNode, boolean) or addChild(ASTJNode).
- Overrides:
remove in class ASTJMember<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>
- Parameters:
node - must be a child of this node
- Returns:
true if operation successful, false otherwise- See Also:
ASTJNode.remove(ASTJNode)
getMembers
protected java.util.List<JNode> getMembers()