public class MXMLFileNode extends MXMLNodeBase implements IMXMLFileNode, IScopedNode, IFileNode, IFileNodeAccumulator
MXMLNodeBase.MXMLNodeInfo
emptyNodeArray, parent
UNKNOWN
Constructor and Description |
---|
MXMLFileNode() |
Modifier and Type | Method and Description |
---|---|
void |
addDeferredFunctionNode(FunctionNode functionNode)
Add a function node whose body contents are deferred.
|
void |
addEmbedNode(IEmbedResolver node)
Adds an embed node to the list of embed nodes within this file.
|
void |
addImportNode(IImportNode node)
Adds an import node to the list of import nodes within this file.
|
void |
addRequiredResourceBundle(String bundleName)
Adds a Resource Bundle to the set of Resource Bundles that are referenced
within this file.
|
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
void |
getAllImportNodes(Collection<IImportNode> imports)
Returns all the imports that are relevant in the current scope.
|
void |
getAllImports(Collection<String> imports)
Returns all the imports that are relevant in the current scope.
|
IASNode |
getChild(int i)
Get a particular child of this node
|
int |
getChildCount()
Get the number of children
|
ICompilerProject |
getCompilerProject()
Returns the project that created this file node.
|
CSSCompilationSession |
getCSSCompilationSession()
Get the CSS semantic information.
|
IMXMLDocumentNode |
getDocumentNode()
Gets the closest ancestor node that is the root node of the MXML file.
|
List<IEmbedResolver> |
getEmbedNodes()
Returns a list of nodes representing embedded assets.
|
IFileSpecification |
getFileSpecification()
Get the
IFileSpecification that produced this node |
List<IImportNode> |
getImportNodes()
Returns the list of the ImportNodes
|
long |
getIncludeTreeLastModified()
Returns a last modification timestamp of the current include file tree
|
IClassDefinition[] |
getLibraryDefinitions() |
String |
getName()
Gets the name of this node.
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
OffsetLookup |
getOffsetLookup() |
Collection<ICompilerProblem> |
getProblems()
Returns the problems that are contained in this file.
|
Set<String> |
getRequiredResourceBundles() |
IASScope |
getScope()
Get the scope associated with this node as an IASScope
|
List<IMXMLStyleNode> |
getStyleNodes()
Assuming
MXMLStyleNode is always a direct child of
MXMLDocumentNode . |
ITargetAttributes |
getTargetAttributes(ICompilerProject project)
If this
IFileNode can be used as the MXML main application or
ActionScript main class, it returns attributes related to SWF target. |
IDefinitionNode[] |
getTopLevelDefinitionNodes(boolean includeDefinitionsOutsideOfPackage,
boolean includeNonPublicDefinitions)
Gets definition nodes within this file node that are children
of the file node or children of a package block node.
|
IDefinition[] |
getTopLevelDefinitions(boolean includeDefinitionsOutsideOfPackage,
boolean includeNonPublicDefinitions)
Gets the definitions corresponding to the definitions nodes
within this file node that are children of the file node
or children of a package block node.
|
boolean |
hasIncludes() |
void |
populateFunctionNodes()
Rebuild function body nodes.
|
protected void |
updateIncludeTreeLastModified(long lastModified) |
accumulateTextFragments, adjustOffsets, createNodeInfo, getClassDefinitionNode, getFileNode, initializationComplete, initializeFromTag, isValidASIdentifier, isValidForCodeGen, isValidXMLTagName, processChildNonWhitespaceUnit, processChildTag, processChildWhitespaceUnit, processIncludeInOrExcludeFromAttribute, processTagSpecificAttribute, processUnitAsAS, resolveSourceAttributePath, setLocation, setLocation, setLocation, setLocation, setLocation
analyze, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getASScope, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTerminal, isTransparent, looselyContains, normalize, replaceChild, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verify
getColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClassDefinitionNode, getFileNode, isValidForCodeGen
contains, getAncestorOfType, getContainingNode, getContainingScope, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public IASNode getChild(int i)
IASNode
getChild
in interface IASNode
getChild
in class MXMLNodeBase
i
- the child's indexpublic int getChildCount()
IASNode
getChildCount
in interface IASNode
getChildCount
in class MXMLNodeBase
public ASTNodeID getNodeID()
IASNode
public String getName()
IMXMLNode
For a node that refers to a class, this is the fully-qualified
ActionScript class name. (For example, for <s:Button>
it would be "spark.components.Button"
.)
For a node that specifies a property, style, or event, this is the name
of the property, style, or event. (For example, for
<s:text>
it would be "text"
.)
For a language node, this is the short name of the tag. (For example, for
<fx:Script>
it would be "Script"
.)
public IMXMLDocumentNode getDocumentNode()
IMXMLNode
getDocumentNode
in interface IMXMLFileNode
getDocumentNode
in interface IMXMLNode
getDocumentNode
in class MXMLNodeBase
IMXMLDocumentNode
object.public IASScope getScope()
IScopedNode
getScope
in interface IScopedNode
public void getAllImports(Collection<String> imports)
IScopedNode
getAllImports
in interface IScopedNode
imports
- an array of Strings representing all the importspublic void getAllImportNodes(Collection<IImportNode> imports)
IScopedNode
getAllImportNodes
in interface IScopedNode
imports
- an array of IImportNode
representing all the
importspublic IDefinition[] getTopLevelDefinitions(boolean includeDefinitionsOutsideOfPackage, boolean includeNonPublicDefinitions)
IFileNode
getTopLevelDefinitions
in interface IFileNode
includeDefinitionsOutsideOfPackage
- A flag indicating whether
definitions that aren't in a package should be included.includeNonPublicDefinitions
- A flag indicating whether definitions
that don't have a public keyword should be included.IDefinition
objects.public IDefinitionNode[] getTopLevelDefinitionNodes(boolean includeDefinitionsOutsideOfPackage, boolean includeNonPublicDefinitions)
IFileNode
getTopLevelDefinitionNodes
in interface IFileNode
includeDefinitionsOutsideOfPackage
- A flag indicating whether
definition nodes that aren't in a package should be included.includeNonPublicDefinitions
- A flag indicating whether
definition nodes that don't have a public keyword should be included.IDefinitionNode
objects.public boolean hasIncludes()
hasIncludes
in interface IFileNode
public IClassDefinition[] getLibraryDefinitions()
public IFileSpecification getFileSpecification()
IASNode
IFileSpecification
that produced this nodegetFileSpecification
in interface IASNode
getFileSpecification
in class NodeBase
public ICompilerProject getCompilerProject()
IMXMLFileNode
getCompilerProject
in interface IMXMLFileNode
ICompilerProject
object.protected boolean buildInnerString(StringBuilder sb)
"C:\test.mxml"
from the path of the file node.buildInnerString
in class NodeBase
protected void updateIncludeTreeLastModified(long lastModified)
lastModified
- public long getIncludeTreeLastModified()
IFileNode
getIncludeTreeLastModified
in interface IFileNode
public void addImportNode(IImportNode node)
IFileNodeAccumulator
addImportNode
in interface IFileNodeAccumulator
node
- Node to addpublic List<IImportNode> getImportNodes()
IFileNodeAccumulator
getImportNodes
in interface IFileNodeAccumulator
public void addEmbedNode(IEmbedResolver node)
IFileNodeAccumulator
addEmbedNode
in interface IFileNodeAccumulator
node
- Node to addpublic List<IEmbedResolver> getEmbedNodes()
IMXMLFileNode
These can be either nodes representing the initialization value of a
variable with [Embed(...)]
metadata, or nodes representing
the compiler directive @Embed(...)
).
getEmbedNodes
in interface IFileNodeAccumulator
getEmbedNodes
in interface IMXMLFileNode
IEmbedResolver
objects.public void addRequiredResourceBundle(String bundleName)
IFileNodeAccumulator
addRequiredResourceBundle
in interface IFileNodeAccumulator
bundleName
- name of the Resource Bundlepublic Set<String> getRequiredResourceBundles()
getRequiredResourceBundles
in interface IFileNodeAccumulator
public OffsetLookup getOffsetLookup()
getOffsetLookup
in interface IFileNode
public List<IMXMLStyleNode> getStyleNodes()
MXMLStyleNode
is always a direct child of
MXMLDocumentNode
.getStyleNodes
in interface IMXMLFileNode
IMXMLStyleNode
's in this MXML document.public ITargetAttributes getTargetAttributes(ICompilerProject project)
IFileNode
IFileNode
can be used as the MXML main application or
ActionScript main class, it returns attributes related to SWF target.
Otherwise, this method returns null.getTargetAttributes
in interface IFileNode
project
- Context project.public CSSCompilationSession getCSSCompilationSession()
getCSSCompilationSession
in interface IMXMLFileNode
public void addDeferredFunctionNode(FunctionNode functionNode)
IFileNodeAccumulator
addDeferredFunctionNode
in interface IFileNodeAccumulator
functionNode
- Function node.public void populateFunctionNodes()
IFileNode
populateFunctionNodes
in interface IFileNode
public Collection<ICompilerProblem> getProblems()
IFileNode
getProblems
in interface IFileNode
ICompilerProblem
objectsCopyright © 2016 The Apache Software Foundation. All rights reserved.