public final class ParameterNode extends BaseVariableNode implements IParameterNode
equalsOperatorStart, isConsttypeNode, typeOperatorStartdefinition, nameNodeemptyNodeArray, parentUNKNOWN| 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, setKeywordbuildBindableGetter, buildBindableSetter, fillinDefinition, getTypeName, getTypeNode, getTypeOperatorEnd, getTypeOperatorStart, hasExplicitType, hasTypeOperator, isAnyType, isVoidType, setTypeaddDecorationChildren, addModifier, fillInMetadata, fillInModifiers, fillInNamespaceAndModifiers, getASDocComment, getDecorationPart, getMetaInfos, getMetaTagsNode, getModifiers, getModifiersContainer, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNamespaceNode, getNameStart, getNodeStartForTooling, getSpanningStart, hasExplicitComment, normalize, setASDocComment, setMetaTags, setModifiersContainer, setNamespaceaddChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildrenbuildStringRecursive, 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, 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, waitgetAssignedValueNode, getDeclarationEnd, getVariableType, getVariableTypeNode, isConstgetASDocComment, hasExplicitCommentgetContainingFilePath, getMetaInfos, getName, getNameAbsoluteEnd, getNameAbsoluteStart, getNameEnd, getNameExpressionNode, getNameStart, getPackageNamecontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic 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()
IASNodepublic IScopedNode getScopeNode()
NodeBasegetScopeNode in class NodeBaseprotected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
analyze in class BaseVariableNodeprotected int getInitialChildCount()
TreeNodegetInitialChildCount in class TreeNodepublic IMetaTagsNode getMetaTags()
IDefinitionNodegetMetaTags in interface IDefinitionNodegetMetaTags in class BaseDefinitionNodeIMetaTagsNode or nullpublic String getNamespace()
IDefinitionNodegetNamespace in interface IDefinitionNodegetNamespace in class BaseDefinitionNodepublic boolean hasNamespace(String namespace)
IDefinitionNodehasNamespace in interface IDefinitionNodehasNamespace in class BaseDefinitionNodenamespace - the namespace to check forpublic boolean hasModifier(ASModifier modifier)
IDefinitionNodeASModifier
for the list of modifiershasModifier in interface IDefinitionNodehasModifier in class BaseDefinitionNodeprotected void ensureTypeNode()
BaseVariableNodeensureTypeNode in class BaseVariableNodepublic DefinitionBase getDefinition()
getDefinition in interface IDefinitionNodegetDefinition in class BaseVariableNodeprotected void setDefinition(IDefinition definition)
setDefinition in class BaseDefinitionNodepublic boolean isImplicit()
IDefinitionNodethis, super,
default constructors, and cast functions.isImplicit in interface IDefinitionNodepublic String getQualifiedName()
IDefinitionNodegetQualifiedName in interface IDefinitionNodepublic String getShortName()
IDefinitionNodegetShortName in interface IDefinitionNodepublic IVariableDefinition.VariableClassification getVariableClassification()
IVariableNodegetVariableClassification in interface IVariableNodepublic boolean isRest()
IParameterNodeisRest in interface IParameterNodepublic boolean hasDefaultValue()
hasDefaultValue in interface IParameterNodepublic String getDefaultValue()
IParameterNodegetDefaultValue in interface IParameterNodepublic void setIsRestParameter(boolean isRest)
Copyright © 2016 The Apache Software Foundation. All rights reserved.