public class MXMLDocumentNode extends MXMLClassDefinitionNode implements IMXMLDocumentNode
MXMLDocumentNode represents the root MXML tag in an MXML document.MXMLNodeBase.MXMLNodeInfo| Modifier and Type | Field and Description |
|---|---|
MXMLClassDirectiveProcessor |
cdp |
protected Map<String,String> |
rootAttributes
A map of special attribute values.
|
emptyNodeArray, parentUNKNOWN| Constructor and Description |
|---|
MXMLDocumentNode(NodeBase parent)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
protected MXMLNodeBase.MXMLNodeInfo |
createNodeInfo(MXMLTreeBuilder builder) |
protected org.apache.flex.compiler.internal.tree.mxml.MXMLSpecifierNodeBase |
createSpecifierNode(MXMLTreeBuilder builder,
String specifierName)
Resolve the specifier name in the class definition to a member
definition, and create a specifier node based on the member type.
|
IASNode |
getChild(int i)
Get a particular child of this node
|
int |
getChildCount()
Get the number of children
|
IClassDefinition |
getClassReference(ICompilerProject project)
Gets the definition of the ActionScript class corresponding to this MXML
tag.
|
IMXMLEventSpecifierNode |
getEventSpecifierNode(String name)
Gets the child node specifying a particular event.
|
IMXMLEventSpecifierNode[] |
getEventSpecifierNodes()
Gets all the child nodes that specify events.
|
String |
getName()
Gets the name of this node.
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IMXMLPropertySpecifierNode |
getPropertySpecifierNode(String name)
Gets the child node specifying a particular property.
|
IMXMLPropertySpecifierNode[] |
getPropertySpecifierNodes()
Gets all the child nodes that specify properties.
|
IMXMLSpecifierNode[] |
getSpecifierNodesWithSuffix(String suffix)
Gets all the child nodes that represent properties, styles, and events
and which have a particular suffix specifying a state or state group.
|
boolean |
isContainer()
Does the class referenced by this node implement
mx.core.IContainer? |
boolean |
isDeferredInstantiationUIComponent()
Does the class referenced by this node implement
mx.core.IDeferredInstantiatonUIComponent? |
boolean |
isMXMLObject()
Does the class referenced by this node implement
mx.core.IMXMLObject? |
boolean |
isVisualElementContainer()
Does the class referenced by this node implement
mx.core.IVisualElementContainer? |
protected void |
processChildNonWhitespaceUnit(MXMLTreeBuilder builder,
IMXMLTagData tag,
IMXMLTextData text,
MXMLNodeBase.MXMLNodeInfo info)
Processes a single child text unit which is not all whitespace.
|
protected void |
processChildTag(MXMLTreeBuilder builder,
IMXMLTagData tag,
IMXMLTagData childTag,
MXMLNodeBase.MXMLNodeInfo info)
Processes a single child tag.
|
protected void |
processTagSpecificAttribute(MXMLTreeBuilder builder,
IMXMLTagData tag,
IMXMLTagAttributeData attribute,
MXMLNodeBase.MXMLNodeInfo info)
Add all attributes to
rootAttributes. |
generateID, getAllImportNodes, getAllImports, getAllStateDependentNodes, getASDocComment, getBaseClassName, getClassClassification, getClassDefinition, getDeclarationsNodes, getDefinition, getGeneratedID, getHasDataBindings, getImplementedInterfaces, getInitialState, getMetadataNodes, getMetaInfos, getMetaTags, getMetaTagsByName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespace, getNameStart, getNodesDependentOnState, getNodeWithID, getPackageName, getQualifiedName, getScope, getScopedNode, getScriptNodes, getShortName, getStateByName, getStateGroupByName, getStateGroupNames, getStateGroups, getStateNames, getStateNode, getStates, hasExplicitComment, hasModifier, hasNamespace, initializationComplete, isImplicit, isState, needsDescriptor, needsDocumentDescriptor, setASDocComment, setHasDataBindings, setScopeaccumulateTextFragments, adjustOffsets, getClassDefinitionNode, getDocumentNode, getFileNode, initializeFromTag, isValidASIdentifier, isValidForCodeGen, isValidXMLTagName, processChildWhitespaceUnit, processIncludeInOrExcludeFromAttribute, 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, getFileSpecification, getInnerString, getNodeKind, 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, waitgetAllStateDependentNodes, getClassDefinition, getDeclarationsNodes, getGeneratedID, getHasDataBindings, getInitialState, getMetadataNodes, getNodesDependentOnState, getNodeWithID, getScriptNodes, getStateByName, getStateGroupByName, getStateGroupNames, getStateGroups, getStateNames, getStatesgetClassReference, getEventSpecifierNode, getEventSpecifierNodes, getPropertySpecifierNode, getPropertySpecifierNodes, getSpecifierNodesWithSuffix, isContainer, isDeferredInstantiationUIComponent, isMXMLObject, isVisualElementContainer, needsDescriptor, needsDocumentDescriptorgetClassDefinitionNode, getDocumentNode, getFileNode, getName, isValidForCodeGengetBaseClassName, getClassClassification, getDefinition, getImplementedInterfaces, getMetaTagsByNamegetScopedNodegetContainingFilePath, getMetaInfos, getMetaTags, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespace, getNameStart, getQualifiedName, getShortName, hasModifier, hasNamespace, isImplicitcontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartgetASDocComment, hasExplicitCommentpublic MXMLClassDirectiveProcessor cdp
public MXMLDocumentNode(NodeBase parent)
parent - The parent node of this node, or null if there
is no parent.public ASTNodeID getNodeID()
IASNodegetNodeID in interface IASNodegetNodeID in class MXMLClassDefinitionNodeprotected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeBase.MXMLNodeInfo info)
MXMLNodeBaseprocessChildTag in class MXMLClassDefinitionNodetag - An MXMLTagData object representing the child tag.
The default behavior implemented in this base class is to report each child tag as a problem.
Subclasses must override this method in order to allow the child tags that they recognize.
protected void processTagSpecificAttribute(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagAttributeData attribute, MXMLNodeBase.MXMLNodeInfo info)
rootAttributes. If the attribute is not a
known special attribute, delegate the process to the base class.
Note that this method might not be triggered if there's only namespace attributes on the root tag.
processTagSpecificAttribute in class MXMLClassDefinitionNodeattribute - An MXMLTagAttributeData object representing the
attribute.public IASNode getChild(int i)
IASNodegetChild in interface IASNodegetChild in class MXMLNodeBasei - the child's indexpublic int getChildCount()
IASNodegetChildCount in interface IASNodegetChildCount in class MXMLNodeBasepublic 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 IClassDefinition getClassReference(ICompilerProject project)
IMXMLClassReferenceNodegetClassReference in interface IMXMLClassReferenceNodeIClassDefinition for the ActionScript class.public boolean isMXMLObject()
IMXMLClassReferenceNodemx.core.IMXMLObject?isMXMLObject in interface IMXMLClassReferenceNodetrue if it does.public boolean isContainer()
IMXMLClassReferenceNodemx.core.IContainer?isContainer in interface IMXMLClassReferenceNodetrue if it does.public boolean isVisualElementContainer()
IMXMLClassReferenceNodemx.core.IVisualElementContainer?isVisualElementContainer in interface IMXMLClassReferenceNodetrue if it does.public boolean isDeferredInstantiationUIComponent()
IMXMLClassReferenceNodemx.core.IDeferredInstantiatonUIComponent?isDeferredInstantiationUIComponent in interface IMXMLClassReferenceNodetrue if it does.public IMXMLPropertySpecifierNode getPropertySpecifierNode(String name)
IMXMLClassReferenceNodegetPropertySpecifierNode in interface IMXMLClassReferenceNodename - The name of the property.IMXMLPropertySpecifierNode specifying that property.public IMXMLPropertySpecifierNode[] getPropertySpecifierNodes()
IMXMLClassReferenceNodegetPropertySpecifierNodes in interface IMXMLClassReferenceNodeIMXMLPropertySpecifierNode objects.public IMXMLEventSpecifierNode getEventSpecifierNode(String name)
IMXMLClassReferenceNodegetEventSpecifierNode in interface IMXMLClassReferenceNodename - The name of the event.IMXMLEventSpecifierNode specifying that event.public IMXMLEventSpecifierNode[] getEventSpecifierNodes()
IMXMLClassReferenceNodegetEventSpecifierNodes in interface IMXMLClassReferenceNodeIMXMLEventSpecifierNode objects.public IMXMLSpecifierNode[] getSpecifierNodesWithSuffix(String suffix)
IMXMLClassReferenceNodegetSpecifierNodesWithSuffix in interface IMXMLClassReferenceNodesuffix - The name of a state or state group.IMXMLSpecifierNode objects.protected MXMLNodeBase.MXMLNodeInfo createNodeInfo(MXMLTreeBuilder builder)
createNodeInfo in class MXMLNodeBaseprotected void processChildNonWhitespaceUnit(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTextData text, MXMLNodeBase.MXMLNodeInfo info)
MXMLNodeBaseThe default behavior implemented in this base class is to report each unit of non-whitespace as a problem.
Subclasses must override this method in order to allow the non-whitespace text unit.
processChildNonWhitespaceUnit in class MXMLNodeBasetext - An MXMLTextData object representing the child text
unit.protected org.apache.flex.compiler.internal.tree.mxml.MXMLSpecifierNodeBase createSpecifierNode(MXMLTreeBuilder builder, String specifierName)
builder - MXML tree builder.specifierName - Specifier name.protected boolean buildInnerString(StringBuilder sb)
"spark.components.Application" from the qualified name of
the class reference by the node.buildInnerString in class NodeBaseCopyright © 2016 The Apache Software Foundation. All rights reserved.