public class ConstantDefinition extends VariableDefinition implements IConstantDefinition
IVariableDefinition.VariableClassification
initValue
FLAG_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 |
---|
ConstantDefinition(String name) |
ConstantDefinition(String name,
Object value)
Construct a ConstantDefinition with a constant value - for use when
building defs from an ABC.
|
Modifier and Type | Method and Description |
---|---|
void |
buildInnerString(StringBuilder sb)
For debugging only.
|
Object |
resolveValue(ICompilerProject project)
Try to calculate the constant value for this ConstantDefinition.
|
Object |
resolveValueFrom(ICompilerProject project,
NodeBase fromNode)
Try to calculate the constant value for this Constant Definition when
referenced from the passed in Node.
|
Object |
resolveValueImpl(ICompilerProject project) |
declaredInControlFlow, getInitExpression, getNode, getTypeDependencyType, getVariableClassification, getVariableNode, isRequiredSkinPart, isSkinPart, matches, resolveInitialValue, setDeclaredInControlFlow, setInitializer
addMetaTag, 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, verify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getArrayElementType, getInstanceType, getPercentProxy, getVariableClassification, getVariableNode, hasCollapseWhiteSpace, hasRichTextContent, isColor, isRequiredSkinPart, isSkinPart, resolveInitialValue
getExplicitSourceComment, hasExplicitComment
getAbsoluteEnd, 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, resolveType
public ConstantDefinition(String name)
public void buildInnerString(StringBuilder sb)
public const N:int
.buildInnerString
in class VariableDefinition
public Object resolveValue(ICompilerProject project)
IConstantDefinition
resolveValue
in interface IConstantDefinition
project
- the project to use to resolve the intializerpublic Object resolveValueFrom(ICompilerProject project, NodeBase fromNode)
project
- project to use to resolve the initializerfromNode
- the node that is referencing this constantpublic Object resolveValueImpl(ICompilerProject project)
Copyright © 2016 The Apache Software Foundation. All rights reserved.