public interface IVariableDefinition extends IDocumentableDefinition
var declaration.
An IVariableDefinitionIVariableNode
for which isConst() is false.
For example, the declaration
public var i:int = 1;creates a variable definition whose base name is
"i",
whose namespace reference is to the public namespace,
and whose type reference is named "int".
A variable definition is contained within a file scope, a package scope, a class scope, an interface scope, or a function scope; it does not contain a scope.
| Modifier and Type | Interface and Description |
|---|---|
static class |
IVariableDefinition.VariableClassification
Variable classifications (local, argument, class member, interface
member, and package member)
|
| Modifier and Type | Method and Description |
|---|---|
String |
getArrayElementType(FlexProject project)
If this
IVariableDefinition is of type Array and has
[ArrayElementType("...")] |
String |
getInstanceType(FlexProject project)
If this
IVariableDefinition is of type
IDeferredInstance and has [InstanceType("...")} |
String |
getPercentProxy(FlexProject project)
If this
IVariableDefinition has
[PercentProxy(...)] metadata,
this method returns the specified property name. |
IVariableDefinition.VariableClassification |
getVariableClassification()
Get the classification for this variable (local, parameter, class member,
etc)
|
IVariableNode |
getVariableNode()
Returns the
IVariableNode from which this definition was created,
if the definition came from the AST for a source file. |
boolean |
hasCollapseWhiteSpace(FlexProject project)
If this
IVariableDefinition has [CollapseWhiteSpace]
metadata, this method returns true Otherwise, it returns
false |
boolean |
hasRichTextContent(FlexProject project)
If this
IVariableDefinition has [RichTextContent]
metadata, this method returns true Otherwise, it returns
false |
boolean |
isColor(FlexProject project)
Returns
true if this IVariableDefinition has
[Inspectable(...)] |
boolean |
isRequiredSkinPart()
Check whether the variable is a required skin part.
|
boolean |
isSkinPart()
Check whether the variable is a skin part.
|
Object |
resolveInitialValue(ICompilerProject project)
Attempt to resolve the initial value assigned to this variable.
|
getExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBaseName, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getNode, 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, resolveTypeIVariableDefinition.VariableClassification getVariableClassification()
IVariableNode getVariableNode()
IVariableNode 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.
Object resolveInitialValue(ICompilerProject project)
project - the Project to resolve things inboolean isSkinPart()
boolean isRequiredSkinPart()
String getArrayElementType(FlexProject project)
IVariableDefinition is of type Array and has
[ArrayElementType("...")] metadata, this method returns the
specified type for the array elements. Otherwise, it returns
null.String getInstanceType(FlexProject project)
IVariableDefinition is of type
IDeferredInstance and has [InstanceType("...")}
metadata, this method returns the specified type for the deferred
instance. Otherwise, it returns null.String getPercentProxy(FlexProject project)
IVariableDefinition has
[PercentProxy(...)] metadata,
this method returns the specified property name.
Otherwise, it returns nullboolean hasRichTextContent(FlexProject project)
IVariableDefinition has [RichTextContent]
metadata, this method returns true Otherwise, it returns
falseboolean hasCollapseWhiteSpace(FlexProject project)
IVariableDefinition has [CollapseWhiteSpace]
metadata, this method returns true Otherwise, it returns
falseboolean isColor(FlexProject project)
true if this IVariableDefinition has
[Inspectable(...)] metadata that specifies
format="Color" Otherwise, returns false.Copyright © 2016 The Apache Software Foundation. All rights reserved.