public class InterfaceNode extends MemberedNode implements IInterfaceNode
IInterfaceNode.InterfaceClassification
Modifier and Type | Field and Description |
---|---|
protected TransparentContainerNode |
baseInterfacesNode
The collection of base interfaces
|
protected FunctionNode |
castFunctionNode
Generated FunctionNode to represent cast function
|
protected KeywordNode |
extendsKeywordNode
The extends keyword (if one is present)
|
protected KeywordNode |
interfaceKeywordNode
The class keyword
|
contentsNode
definition, nameNode
emptyNodeArray, parent
UNKNOWN
Constructor and Description |
---|
InterfaceNode(ExpressionNodeBase name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addBaseInterface(ExpressionNodeBase interfaceName)
Add an implemented interface to this class.
|
protected void |
analyze(EnumSet<PostProcessStep> set,
ASScope scope,
Collection<ICompilerProblem> problems) |
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
ContainerNode |
getBaseInterfacesNode()
Get the container of base interfaces for this interfaces
|
FunctionNode |
getCastFunctionNode()
Get the dummy node representing the cast function
|
KeywordNode |
getClassKeywordNode()
Get the node containing the class keyword
|
InterfaceDefinition |
getDefinition()
Gets the symbol that represents this
IInterfaceNode |
IExpressionNode[] |
getExtendedInterfaceNodes()
Returns the names of any interfaces that this
IInterfaceNode
directly references. |
String[] |
getExtendedInterfaces()
Returns the names of any interfaces that this
IInterfaceNode
directly references. |
KeywordNode |
getExtendsKeywordNode()
Get the node containing the extends keyword, if one exists
|
protected int |
getInitialChildCount()
Take a guess as to an efficient initial child count.
|
IInterfaceNode.InterfaceClassification |
getInterfaceClassification()
Returns the classification of this ActionScript interface
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
String |
getQualifiedName()
Get the qualified name of this type
|
String |
getShortName()
Get the short name of this type (without any package information)
|
int |
getSpanningStart()
Gets the local offset where the node starts, including any extra items that may
change the appearance of the node's start.
|
boolean |
hasModifier(ASModifier modifier)
Is the given modifier present on this definition?
|
protected void |
init(ExpressionNodeBase nameNode) |
boolean |
isImplicit()
Is this definition an implicit definition that doesn't actually appear in
the source file?
|
protected void |
setChildren(boolean fillInOffsets)
If this node has custom children (names, arguments, etc), shove them into
the list of children.
|
protected void |
setDefinition(IDefinition definition) |
void |
setExtendsKeyword(IASToken extendsKeyword)
Sets the extends keyword if one is present.
|
void |
setInterfaceKeyword(IASToken interfaceKeyword)
Sets the interface keyword.
|
getAllMemberDefinitionNodes, getScopedNode
addDecorationChildren, addModifier, createDecorationPart, fillInMetadata, fillInModifiers, fillInNamespaceAndModifiers, getASDocComment, getDecorationPart, getMetaInfos, getMetaTags, getMetaTagsNode, getModifiers, getModifiersContainer, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespace, getNamespaceNode, getNameStart, getNodeStartForTooling, hasExplicitComment, hasNamespace, normalize, setASDocComment, setMetaTags, setModifiersContainer, setNamespace
addChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildren
buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getASScope, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getStart, getSucceedingNode, getWorkspace, isTerminal, isTransparent, looselyContains, runPostProcess, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, 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
getAllMemberDefinitionNodes
getScopedNode
getContainingFilePath, getMetaInfos, getMetaTags, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespace, getNameStart, getPackageName, hasNamespace
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
getASDocComment, hasExplicitComment
protected KeywordNode interfaceKeywordNode
protected KeywordNode extendsKeywordNode
protected TransparentContainerNode baseInterfacesNode
protected FunctionNode castFunctionNode
public InterfaceNode(ExpressionNodeBase name)
name
- The node holding the interface name.public ASTNodeID getNodeID()
IASNode
public int getSpanningStart()
IASNode
getSpanningStart
in interface IASNode
getSpanningStart
in class BaseDefinitionNode
protected void setChildren(boolean fillInOffsets)
NodeBase
setChildren
in class NodeBase
protected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
analyze
in class BaseDefinitionNode
protected boolean buildInnerString(StringBuilder sb)
NodeBase
buildOuterString()
.
It is overridden by subclasses to display optional node-specific
information in the middle of the string, between the node type and the
location information.buildInnerString
in class NodeBase
protected int getInitialChildCount()
TreeNode
getInitialChildCount
in class TreeNode
protected void init(ExpressionNodeBase nameNode)
init
in class BaseDefinitionNode
public boolean hasModifier(ASModifier modifier)
IDefinitionNode
ASModifier
for the list of modifiershasModifier
in interface IDefinitionNode
hasModifier
in class BaseDefinitionNode
public InterfaceDefinition getDefinition()
IInterfaceNode
IInterfaceNode
getDefinition
in interface IDefinitionNode
getDefinition
in interface IInterfaceNode
getDefinition
in class BaseDefinitionNode
IInterfaceDefinition
that is the symbolic
representation of this nodeprotected void setDefinition(IDefinition definition)
setDefinition
in class BaseDefinitionNode
public boolean isImplicit()
IDefinitionNode
this
, super
,
default constructors, and cast functions.isImplicit
in interface IDefinitionNode
public String getQualifiedName()
IDefinitionNode
getQualifiedName
in interface IDefinitionNode
public String getShortName()
IDefinitionNode
getShortName
in interface IDefinitionNode
public IInterfaceNode.InterfaceClassification getInterfaceClassification()
IInterfaceNode
getInterfaceClassification
in interface IInterfaceNode
IInterfaceNode.InterfaceClassification
public IExpressionNode[] getExtendedInterfaceNodes()
IInterfaceNode
IInterfaceNode
directly references. This does not walk up the inheritance chain, rather
only looks at what is directly defined on the interfacegetExtendedInterfaceNodes
in interface IInterfaceNode
public String[] getExtendedInterfaces()
IInterfaceNode
IInterfaceNode
directly references. This does not walk up the inheritance chain, rather
only looks at what is directly defined on the interfacegetExtendedInterfaces
in interface IInterfaceNode
public void setInterfaceKeyword(IASToken interfaceKeyword)
interfaceKeyword
- token containing the keywordpublic KeywordNode getClassKeywordNode()
public KeywordNode getExtendsKeywordNode()
public void setExtendsKeyword(IASToken extendsKeyword)
extendsKeyword
- token containing the keywordpublic void addBaseInterface(ExpressionNodeBase interfaceName)
interfaceName
- node containing the interface namepublic ContainerNode getBaseInterfacesNode()
public FunctionNode getCastFunctionNode()
Copyright © 2016 The Apache Software Foundation. All rights reserved.