public final class ParameterNode extends BaseVariableNode implements IParameterNode
equalsOperatorStart, isConst
typeNode, typeOperatorStart
definition, nameNode
emptyNodeArray, parent
UNKNOWN
Constructor and Description |
---|
ParameterNode(IdentifierNode nameNode)
Constructor.
|
ParameterNode(IdentifierNode nameNode,
ExpressionNodeBase typeNode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
analyze(EnumSet<PostProcessStep> set,
ASScope scope,
Collection<ICompilerProblem> problems) |
protected void |
ensureTypeNode()
Ensures the that this variable will have a type as a child.
|
String |
getDefaultValue()
Returns the optional default value specified by the default value passed
into an argument
|
DefinitionBase |
getDefinition() |
protected int |
getInitialChildCount()
Take a guess as to an efficient initial child count.
|
IMetaTagsNode |
getMetaTags()
Get the metadata tags of this node.
|
String |
getNamespace()
Returns the namespace that this member belongs to
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
String |
getQualifiedName()
Get the qualified name of this type
|
IScopedNode |
getScopeNode()
Get the nearest containing scope for this node.
|
String |
getShortName()
Get the short name of this type (without any package information)
|
IVariableDefinition.VariableClassification |
getVariableClassification()
Get the classification for this variable (local, argument, class member,
etc)
|
boolean |
hasDefaultValue() |
boolean |
hasModifier(ASModifier modifier)
Is the given modifier present on this definition?
|
boolean |
hasNamespace(String namespace)
Is the given namespace present on this definition?
|
boolean |
isImplicit()
Is this definition an implicit definition that doesn't actually appear in
the source file?
|
boolean |
isRest()
Returns true if this argument is a rest-style argument, signified by ...
|
protected void |
setDefinition(IDefinition definition) |
void |
setIsRestParameter(boolean isRest) |
buildInnerString, createDecorationPart, getAssignedValueNode, getDeclarationEnd, getEqualsOperatorEnd, getEqualsOperatorStart, getKeywordNode, getVariableType, getVariableTypeNode, hasEqualsOperator, init, isConst, setAssignedValue, setChildren, setIsConst, setKeyword, setKeyword
buildBindableGetter, buildBindableSetter, fillinDefinition, getTypeName, getTypeNode, getTypeOperatorEnd, getTypeOperatorStart, hasExplicitType, hasTypeOperator, isAnyType, isVoidType, setType
addDecorationChildren, addModifier, fillInMetadata, fillInModifiers, fillInNamespaceAndModifiers, getASDocComment, getDecorationPart, getMetaInfos, getMetaTagsNode, getModifiers, getModifiersContainer, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespaceNode, getNameStart, getNodeStartForTooling, getSpanningStart, hasExplicitComment, 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, 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
getAssignedValueNode, getDeclarationEnd, getVariableType, getVariableTypeNode, isConst
getASDocComment, hasExplicitComment
getContainingFilePath, getMetaInfos, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNameStart, getPackageName
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public ParameterNode(IdentifierNode nameNode)
nameNode
- The identifier node representing the name of the parameter.public ParameterNode(IdentifierNode nameNode, ExpressionNodeBase typeNode)
nameNode
- The identifier node representing the name of the parameter.typeNode
- The expression node reperesenting the type of teh parameter.public ASTNodeID getNodeID()
IASNode
public IScopedNode getScopeNode()
NodeBase
getScopeNode
in class NodeBase
protected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
analyze
in class BaseVariableNode
protected int getInitialChildCount()
TreeNode
getInitialChildCount
in class TreeNode
public IMetaTagsNode getMetaTags()
IDefinitionNode
getMetaTags
in interface IDefinitionNode
getMetaTags
in class BaseDefinitionNode
IMetaTagsNode
or nullpublic String getNamespace()
IDefinitionNode
getNamespace
in interface IDefinitionNode
getNamespace
in class BaseDefinitionNode
public boolean hasNamespace(String namespace)
IDefinitionNode
hasNamespace
in interface IDefinitionNode
hasNamespace
in class BaseDefinitionNode
namespace
- the namespace to check forpublic boolean hasModifier(ASModifier modifier)
IDefinitionNode
ASModifier
for the list of modifiershasModifier
in interface IDefinitionNode
hasModifier
in class BaseDefinitionNode
protected void ensureTypeNode()
BaseVariableNode
ensureTypeNode
in class BaseVariableNode
public DefinitionBase getDefinition()
getDefinition
in interface IDefinitionNode
getDefinition
in class BaseVariableNode
protected 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 IVariableDefinition.VariableClassification getVariableClassification()
IVariableNode
getVariableClassification
in interface IVariableNode
public boolean isRest()
IParameterNode
isRest
in interface IParameterNode
public boolean hasDefaultValue()
hasDefaultValue
in interface IParameterNode
public String getDefaultValue()
IParameterNode
getDefaultValue
in interface IParameterNode
public void setIsRestParameter(boolean isRest)
Copyright © 2016 The Apache Software Foundation. All rights reserved.