public class ParameterDefinition extends VariableDefinition implements IParameterDefinition
After a parameter definition is in the symbol table, it should always be
accessed through the read-only IParameterDefinition interface.
IVariableDefinition.VariableClassificationinitValueFLAG_CAST_FUNCTION, FLAG_CONSTRUCTOR, FLAG_CONTINGENT, FLAG_DECLARED_IN_CONTROL_FLOW, FLAG_DEFAULT, FLAG_DEPRECATED, FLAG_DYNAMIC, FLAG_FINAL, FLAG_GENERATED_EMBED_CLASS, FLAG_HAS_INIT, FLAG_IMPLICIT, FLAG_NATIVE, FLAG_OVERRIDE, FLAG_REST, FLAG_STATIC, flags, nodeRef, singletonEmptyMetaTags| Constructor and Description |
|---|
ParameterDefinition(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildInnerString(StringBuilder sb)
For debugging only.
|
IParameterNode |
getNode()
Returns the
IDefinitionNode from which this definition was
created, if the definition came from the AST for a source file. |
protected DependencyType |
getTypeDependencyType()
Gets the
DependencyType that should be used when resolving the
type of this variable definition. |
IVariableDefinition.VariableClassification |
getVariableClassification()
Get the classification for this variable (local, parameter, class member,
etc)
|
boolean |
hasDefaultValue() |
boolean |
isRest()
Returns true if this argument is a rest-style argument, signified by ...
|
boolean |
matches(DefinitionBase node) |
Object |
resolveDefaultValue(ICompilerProject project)
Attempt to resolve the default value assigned to this parameter.
|
void |
setDefaultValue(Object value) |
void |
setHasDefault() |
void |
setRest() |
declaredInControlFlow, getInitExpression, getVariableNode, isRequiredSkinPart, isSkinPart, resolveInitialValue, setDeclaredInControlFlow, setInitializeraddMetaTag, buildString, getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getArrayElementType, getBaseName, getBindableEventNames, getColumn, getContainingASScope, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDefinition, getDeprecationInfo, getEnd, getExplicitSourceComment, getFileScope, getFileSpecification, getInstanceType, getLine, getLocationString, getMaxSize, getMetaTagByName, getMetaTagsByName, getMName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNamespaceReferenceAsString, getNameStart, getPackageName, getParent, getPercentProxy, getQualifiedName, getSize, getSkinPart, getSourcePath, getStart, getStorageName, getTypeAsDisplayString, getTypeReference, hasCollapseWhiteSpace, hasExplicitComment, hasMetaTagByName, hasModifier, hasNamespace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isDynamic, isEmpty, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, resolveNamespace, resolveType, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toStorageName, toString, unsetOverride, verifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArrayElementType, getInstanceType, getPercentProxy, getVariableNode, hasCollapseWhiteSpace, hasRichTextContent, isColor, isRequiredSkinPart, isSkinPart, resolveInitialValuegetExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBaseName, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getPackageName, getParent, getQualifiedName, getSourcePath, getStart, getTypeAsDisplayString, getTypeReference, hasMetaTagByName, hasModifier, hasNamespace, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isDynamic, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isStatic, resolveNamespace, resolveTypepublic ParameterDefinition(String name)
public boolean isRest()
IParameterDefinitionisRest in interface IParameterDefinitionpublic void setRest()
public boolean hasDefaultValue()
hasDefaultValue in interface IParameterDefinitionpublic void setHasDefault()
public void setDefaultValue(Object value)
public Object resolveDefaultValue(ICompilerProject project)
IParameterDefinitionresolveDefaultValue in interface IParameterDefinitionproject - the Project to resolve things inprotected DependencyType getTypeDependencyType()
VariableDefinitionDependencyType that should be used when resolving the
type of this variable definition.
This method is intended to be overridden by sub-classes.
getTypeDependencyType in class VariableDefinitionDependencyType that should be used when resolving the
type of this variable definitionpublic IParameterNode getNode()
IDefinitionIDefinitionNode from which this definition was
created, if the definition came from the AST for a source file.
This method may require the AST to be reloaded or regenerated and therefore may be slow.
More specific definition interfaces such as IClassDefinition
redeclare this method to return a more specific node interface such as
IClassNode.
getNode in interface IDefinitiongetNode in interface IParameterDefinitiongetNode in class VariableDefinitionpublic boolean matches(DefinitionBase node)
matches in class VariableDefinitionpublic void buildInnerString(StringBuilder sb)
buildInnerString in class VariableDefinitionpublic final IVariableDefinition.VariableClassification getVariableClassification()
IVariableDefinitiongetVariableClassification in interface IVariableDefinitiongetVariableClassification in class VariableDefinitionCopyright © 2016 The Apache Software Foundation. All rights reserved.