org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTJAbstractType<T extends org.eclipse.jdt.core.dom.AbstractTypeDeclaration>

java.lang.Object
  extended by org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
      extended by org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode<T>
          extended by org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember<T>
              extended by 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


Field Summary
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember
comment
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJNode
isCommentedOut, name, rewriter, UNITIALIZED_STRING
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
EMPTY_STRING_ARRAY, qualifiedName
 
Constructor Summary
protected ASTJAbstractType(T abstractTypeDeclaration)
           
 
Method Summary
 boolean addChild(ASTJNode<?> child)
          Adds a child to this node.
protected  java.lang.String computeQualifiedName()
           
 java.util.List<JNode> getChildren()
          Returns the list of children.
protected  java.util.List<JNode> getMembers()
           
 java.lang.String getName()
          Returns the name of this node.
 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 setName(java.lang.String name)
          Sets the name of this node.
 
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.ast.ASTJMember
dispose, getAnnotationList, getComment, getFlags, insertLastAnnotation, setComment, setFlags
 
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 org.eclipse.emf.codegen.merge.java.facade.AbstractJNode
computeQualifiedName, computeQualifiedName, computeQualifiedName, getName, getQualifiedName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.codegen.merge.java.facade.JMember
getComment, setComment
 
Methods inherited from interface org.eclipse.emf.codegen.merge.java.facade.JNode
getContents, getFlags, getParent, getQualifiedName, setFlags
 

Constructor Detail

ASTJAbstractType

protected ASTJAbstractType(T abstractTypeDeclaration)
Method Detail

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 insert
before - 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()

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.