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, parent
UNKNOWN
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, setScope
accumulateTextFragments, adjustOffsets, getClassDefinitionNode, getDocumentNode, getFileNode, initializeFromTag, isValidASIdentifier, isValidForCodeGen, isValidXMLTagName, processChildWhitespaceUnit, processIncludeInOrExcludeFromAttribute, 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, 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, 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
getAllStateDependentNodes, getClassDefinition, getDeclarationsNodes, getGeneratedID, getHasDataBindings, getInitialState, getMetadataNodes, getNodesDependentOnState, getNodeWithID, getScriptNodes, getStateByName, getStateGroupByName, getStateGroupNames, getStateGroups, getStateNames, getStates
getClassReference, getEventSpecifierNode, getEventSpecifierNodes, getPropertySpecifierNode, getPropertySpecifierNodes, getSpecifierNodesWithSuffix, isContainer, isDeferredInstantiationUIComponent, isMXMLObject, isVisualElementContainer, needsDescriptor, needsDocumentDescriptor
getClassDefinitionNode, getDocumentNode, getFileNode, getName, isValidForCodeGen
getBaseClassName, getClassClassification, getDefinition, getImplementedInterfaces, getMetaTagsByName
getScopedNode
getContainingFilePath, getMetaInfos, getMetaTags, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespace, getNameStart, getQualifiedName, getShortName, hasModifier, hasNamespace, isImplicit
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
getASDocComment, hasExplicitComment
public MXMLClassDirectiveProcessor cdp
public MXMLDocumentNode(NodeBase parent)
parent
- The parent node of this node, or null
if there
is no parent.public ASTNodeID getNodeID()
IASNode
getNodeID
in interface IASNode
getNodeID
in class MXMLClassDefinitionNode
protected void processChildTag(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTagData childTag, MXMLNodeBase.MXMLNodeInfo info)
MXMLNodeBase
processChildTag
in class MXMLClassDefinitionNode
tag
- 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 MXMLClassDefinitionNode
attribute
- An MXMLTagAttributeData
object representing the
attribute.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 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)
IMXMLClassReferenceNode
getClassReference
in interface IMXMLClassReferenceNode
IClassDefinition
for the ActionScript class.public boolean isMXMLObject()
IMXMLClassReferenceNode
mx.core.IMXMLObject
?isMXMLObject
in interface IMXMLClassReferenceNode
true
if it does.public boolean isContainer()
IMXMLClassReferenceNode
mx.core.IContainer
?isContainer
in interface IMXMLClassReferenceNode
true
if it does.public boolean isVisualElementContainer()
IMXMLClassReferenceNode
mx.core.IVisualElementContainer
?isVisualElementContainer
in interface IMXMLClassReferenceNode
true
if it does.public boolean isDeferredInstantiationUIComponent()
IMXMLClassReferenceNode
mx.core.IDeferredInstantiatonUIComponent
?isDeferredInstantiationUIComponent
in interface IMXMLClassReferenceNode
true
if it does.public IMXMLPropertySpecifierNode getPropertySpecifierNode(String name)
IMXMLClassReferenceNode
getPropertySpecifierNode
in interface IMXMLClassReferenceNode
name
- The name of the property.IMXMLPropertySpecifierNode
specifying that property.public IMXMLPropertySpecifierNode[] getPropertySpecifierNodes()
IMXMLClassReferenceNode
getPropertySpecifierNodes
in interface IMXMLClassReferenceNode
IMXMLPropertySpecifierNode
objects.public IMXMLEventSpecifierNode getEventSpecifierNode(String name)
IMXMLClassReferenceNode
getEventSpecifierNode
in interface IMXMLClassReferenceNode
name
- The name of the event.IMXMLEventSpecifierNode
specifying that event.public IMXMLEventSpecifierNode[] getEventSpecifierNodes()
IMXMLClassReferenceNode
getEventSpecifierNodes
in interface IMXMLClassReferenceNode
IMXMLEventSpecifierNode
objects.public IMXMLSpecifierNode[] getSpecifierNodesWithSuffix(String suffix)
IMXMLClassReferenceNode
getSpecifierNodesWithSuffix
in interface IMXMLClassReferenceNode
suffix
- The name of a state or state group.IMXMLSpecifierNode
objects.protected MXMLNodeBase.MXMLNodeInfo createNodeInfo(MXMLTreeBuilder builder)
createNodeInfo
in class MXMLNodeBase
protected void processChildNonWhitespaceUnit(MXMLTreeBuilder builder, IMXMLTagData tag, IMXMLTextData text, MXMLNodeBase.MXMLNodeInfo info)
MXMLNodeBase
The 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 MXMLNodeBase
text
- 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 NodeBase
Copyright © 2016 The Apache Software Foundation. All rights reserved.