public class MXMLFileNode extends MXMLNodeBase implements IMXMLFileNode, IScopedNode, IFileNode, IFileNodeAccumulator
MXMLNodeBase.MXMLNodeInfoemptyNodeArray, parentUNKNOWN| 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, setLocationanalyze, 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, verifygetColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassDefinitionNode, getFileNode, isValidForCodeGencontains, getAncestorOfType, getContainingNode, getContainingScope, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic IASNode getChild(int i)
IASNodegetChild in interface IASNodegetChild in class MXMLNodeBasei - the child's indexpublic int getChildCount()
IASNodegetChildCount in interface IASNodegetChildCount in class MXMLNodeBasepublic ASTNodeID getNodeID()
IASNodepublic 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()
IMXMLNodegetDocumentNode in interface IMXMLFileNodegetDocumentNode in interface IMXMLNodegetDocumentNode in class MXMLNodeBaseIMXMLDocumentNode object.public IASScope getScope()
IScopedNodegetScope in interface IScopedNodepublic void getAllImports(Collection<String> imports)
IScopedNodegetAllImports in interface IScopedNodeimports - an array of Strings representing all the importspublic void getAllImportNodes(Collection<IImportNode> imports)
IScopedNodegetAllImportNodes in interface IScopedNodeimports - an array of IImportNode representing all the
importspublic IDefinition[] getTopLevelDefinitions(boolean includeDefinitionsOutsideOfPackage, boolean includeNonPublicDefinitions)
IFileNodegetTopLevelDefinitions in interface IFileNodeincludeDefinitionsOutsideOfPackage - 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)
IFileNodegetTopLevelDefinitionNodes in interface IFileNodeincludeDefinitionsOutsideOfPackage - 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 IFileNodepublic IClassDefinition[] getLibraryDefinitions()
public IFileSpecification getFileSpecification()
IASNodeIFileSpecification that produced this nodegetFileSpecification in interface IASNodegetFileSpecification in class NodeBasepublic ICompilerProject getCompilerProject()
IMXMLFileNodegetCompilerProject in interface IMXMLFileNodeICompilerProject object.protected boolean buildInnerString(StringBuilder sb)
"C:\test.mxml"
from the path of the file node.buildInnerString in class NodeBaseprotected void updateIncludeTreeLastModified(long lastModified)
lastModified - public long getIncludeTreeLastModified()
IFileNodegetIncludeTreeLastModified in interface IFileNodepublic void addImportNode(IImportNode node)
IFileNodeAccumulatoraddImportNode in interface IFileNodeAccumulatornode - Node to addpublic List<IImportNode> getImportNodes()
IFileNodeAccumulatorgetImportNodes in interface IFileNodeAccumulatorpublic void addEmbedNode(IEmbedResolver node)
IFileNodeAccumulatoraddEmbedNode in interface IFileNodeAccumulatornode - 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 IFileNodeAccumulatorgetEmbedNodes in interface IMXMLFileNodeIEmbedResolver objects.public void addRequiredResourceBundle(String bundleName)
IFileNodeAccumulatoraddRequiredResourceBundle in interface IFileNodeAccumulatorbundleName - name of the Resource Bundlepublic Set<String> getRequiredResourceBundles()
getRequiredResourceBundles in interface IFileNodeAccumulatorpublic OffsetLookup getOffsetLookup()
getOffsetLookup in interface IFileNodepublic List<IMXMLStyleNode> getStyleNodes()
MXMLStyleNode is always a direct child of
MXMLDocumentNode.getStyleNodes in interface IMXMLFileNodeIMXMLStyleNode's in this MXML document.public ITargetAttributes getTargetAttributes(ICompilerProject project)
IFileNodeIFileNode 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 IFileNodeproject - Context project.public CSSCompilationSession getCSSCompilationSession()
getCSSCompilationSession in interface IMXMLFileNodepublic void addDeferredFunctionNode(FunctionNode functionNode)
IFileNodeAccumulatoraddDeferredFunctionNode in interface IFileNodeAccumulatorfunctionNode - Function node.public void populateFunctionNodes()
IFileNodepopulateFunctionNodes in interface IFileNodepublic Collection<ICompilerProblem> getProblems()
IFileNodegetProblems in interface IFileNodeICompilerProblem objectsCopyright © 2016 The Apache Software Foundation. All rights reserved.