com.adobe.flexbuilder.codemodel.tree
Interface IASNode

All Superinterfaces:
com.adobe.flexbuilder.codemodel.internal.testing.IAdaptableNode
All Known Subinterfaces:
IComponentScopeNode, IExpressionNode, IFileNode, IProjectRootNode, IScopedNode

public interface IASNode
extends com.adobe.flexbuilder.codemodel.internal.testing.IAdaptableNode

Interface for an ActionScript parse tree node


Method Summary
 IASNode getAncestorOfType(java.lang.Class nodeType)
          Get the nearest ancestor of this node that has the specified type.
 IASNode getChild(int i)
          Get a particular child of this node
 int getChildCount()
          Get the number of children
 IASNode[] getChildren()
          Get the children of this node
 int getEnd()
          Get the offset where this node ends
 java.lang.String getNodeStackTrace()
          Dump the ancestors of this node to a string (for debugging)
 java.lang.String getNodeType()
          Get the node type (as a string)
 java.lang.String getPackageName()
          Get package name that applies to this node.
 IASNode getParent()
          Get the parent of this node
 int getSpanningStart()
          Gets the offset where the node starts, including any extra items that may change the appearance of the node's start.
 int getStart()
          Get the offset where this node starts
 
Methods inherited from interface com.adobe.flexbuilder.codemodel.internal.testing.IAdaptableNode
getAdaptableAttribute, getAdaptableAttributes, getAdaptableChildren, getAdaptableName
 

Method Detail

getStart

public int getStart()
Get the offset where this node starts

Returns:
the offset where this node starts

getEnd

public int getEnd()
Get the offset where this node ends

Returns:
the offset where this node ends

getSpanningStart

public int getSpanningStart()
Gets the offset where the node starts, including any extra items that may change the appearance of the node's start. These can include namespaces, keywords, modifiers, etc

Returns:
the start of the span

getParent

public IASNode getParent()
Get the parent of this node

Returns:
the parent of this node

getChildren

public IASNode[] getChildren()
Get the children of this node

Returns:
an array of this node's children

getChildCount

public int getChildCount()
Get the number of children

Returns:
the number of children

getChild

public IASNode getChild(int i)
Get a particular child of this node

Parameters:
i - the child's index
Returns:
the specified child

getNodeType

public java.lang.String getNodeType()
Get the node type (as a string)

Returns:
the node type

getAncestorOfType

public IASNode getAncestorOfType(java.lang.Class nodeType)
Get the nearest ancestor of this node that has the specified type.

Parameters:
nodeType - the node type for which to search
Returns:
the nearest ancestor that has the specified type (null if no such node exists)

getPackageName

public java.lang.String getPackageName()
Get package name that applies to this node. If this node doesn't reside inside a package definition, this method will return null.

Returns:
String containing fully-qualified package name

getNodeStackTrace

public java.lang.String getNodeStackTrace()
Dump the ancestors of this node to a string (for debugging)

Returns:
string containing the list of ancestors