public final class ClassTraitsDefinition extends TypeDefinitionBase
TypeDefinitionBase.StaticTypeIterator, TypeDefinitionBase.TypeIteratorFLAG_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| Modifier and Type | Method and Description |
|---|---|
int |
getAbsoluteEnd()
Gets the absolute ending offset of the entire definition (not just the
name).
|
int |
getAbsoluteStart()
Gets the absolute starting offset of the entire definition (not just the
name).
|
IMetaTag[] |
getAllMetaTags()
Returns all the
IMetaTagNode objects as an array |
String |
getBaseName()
Gets the base (i.e., unqualified) name of this definition.
|
int |
getColumn()
Gets the local column number of the entire definition (not just the
name).
|
ASScope |
getContainedScope()
Get the scope for this traits - will return the static scope so lookups
in the returned scope will only find statics.
|
String |
getContainingFilePath()
Gets the file path in which this definition is defined.
|
IASScope |
getContainingScope()
Gets the scope in which this definition exists.
|
String |
getContainingSourceFilePath(ICompilerProject project)
Gets the source file path in which this definition is defined.
|
int |
getEnd()
Gets the local ending offset of this entire definition (not just the
name).
|
ASFileScope |
getFileScope() |
IFileSpecification |
getFileSpecification() |
int |
getLine()
Gets the local line number of this entire definition (not just the name).
|
protected String |
getLocationString() |
IMetaTag |
getMetaTagByName(String name)
Returns the first
IMetaTagNode matching the given name |
IMetaTag[] |
getMetaTagsByName(String name)
Gets all the
IMetaTagNode objects that match the given name |
Name |
getMName(ICompilerProject project)
Codegen should never ask for the AET Name of a class traits
|
ModifiersSet |
getModifiers() |
int |
getNameColumn()
Get column number for the name of this definition, if it can be
determined.
|
int |
getNameEnd()
Gets the local ending offset of the name of this definition.
|
int |
getNameLine()
Get line number for the name of this definition, if it can be determined.
|
INamespaceReference |
getNamespaceReference()
Gets the namespace that this definition belongs to.
|
protected String |
getNamespaceReferenceAsString() |
int |
getNameStart()
If the definition has metadata "__go_to_definition_help", use the
annotated location.
|
ITypeNode |
getNode()
Returns the
IDefinitionNode from which this definition was
created, if the definition came from the AST for a source file. |
String |
getPackageName()
Gets the fully-qualified package name for this definition.
|
INamespaceDefinition |
getProtectedNamespaceReference()
Gets the
INamespaceDefinition that represents the protected
namespace for this type. |
String |
getQualifiedName()
Gets the fully-qualified name of this definition.
|
String |
getSourcePath()
Gets the local source path of the entire definition (not just the name).
|
int |
getStart()
Gets the local starting offset of the entire definition (not just the
name).
|
INamespaceDefinition |
getStaticProtectedNamespaceReference()
Gets the
INamespaceDefinition that represents the static
protected namespace for this type. |
boolean |
hasExplicitComment()
Determines if this node has an explicit comment.
|
boolean |
hasMetaTagByName(String name)
Determines if a specific
IMetaTagNode exists in this collection |
boolean |
hasModifier(ASModifier modifier)
Determines whether the specified modifier is present on this definition.
|
boolean |
hasNamespace(INamespaceReference namespace,
ICompilerProject project)
Determines whether the specified namespace is present on this definition.
|
boolean |
isDynamic()
Class traits are never dynamic
|
boolean |
isFinal()
Is this definition marked as
final? |
boolean |
isInProject(ICompilerProject project)
Debugging method that can be used to assert that a definition is a specified project.
|
boolean |
isInstanceOf(ITypeDefinition type,
ICompilerProject project)
isInstanceOf for the class traits - basically will return true if type is
Class or Object
|
boolean |
isNative()
Is this definition marked as
native? |
boolean |
isOverride()
Is this definition marked as
override? |
boolean |
isStatic()
Is this definition marked as
static? |
boolean |
isTopLevelDefinition()
Is this definition a toplevel definition
|
boolean |
matches(DefinitionBase node) |
Set<IInterfaceDefinition> |
resolveAllInterfaces(ICompilerProject project) |
IInterfaceDefinition[] |
resolveInterfacesImpl(ICompilerProject project)
Resolve the interfaces that this definition extends (if an interface), or implements (if a class).
|
filterNullInterfaces, isInstanceOf, resolveType, staticTypeIterable, typeIteratablesetContainedScope, verifyaddMetaTag, buildInnerString, buildString, getAncestorOfType, getArrayElementType, getBindableEventNames, getContainingASScope, getDefinition, getDeprecationInfo, getExplicitSourceComment, getInstanceType, getMaxSize, getParent, getPercentProxy, getSize, getSkinPart, getStorageName, getTypeAsDisplayString, getTypeDependencyType, getTypeReference, hasCollapseWhiteSpace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isEmpty, isGeneratedEmbedClass, isImplicit, isInternal, isPrivate, isProtected, isPublic, isRequiredSkinPart, resolveNamespace, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toStorageName, toString, unsetOverrideclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetExplicitSourceCommentgetAncestorOfType, getBindableEventNames, getDeprecationInfo, getParent, getTypeAsDisplayString, getTypeReference, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isGeneratedEmbedClass, isImplicit, isInternal, isPrivate, isProtected, isPublic, resolveNamespacepublic ASScope getContainedScope()
getContainedScope in interface IScopedDefinitiongetContainedScope in class ScopedDefinitionBaseIScopedDefinitionpublic boolean isDynamic()
isDynamic in interface IDefinitionisDynamic in class DefinitionBasetrue if the definition is dynamic.public Name getMName(ICompilerProject project)
getMName in class DefinitionBaseproject - the Project to use when resolving the Definitions
Namespacepublic boolean isInstanceOf(ITypeDefinition type, ICompilerProject project)
type - An ITypeDefinition representing a class or interface.project - The ICompilerProject within which references should
be resolvedpublic boolean matches(DefinitionBase node)
matches in class DefinitionBasepublic ITypeNode 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 ITypeDefinitiongetNode in class TypeDefinitionBasepublic Set<IInterfaceDefinition> resolveAllInterfaces(ICompilerProject project)
public int getNameStart()
TypeDefinitionBaseGets the local starting offset of the name of this definition. It is zero-based.
getNameStart in interface IDefinitiongetNameStart in class TypeDefinitionBaseint for the offset.public String getPackageName()
IDefinition
For example, the backage name of the class definition
for the class flash.display.Sprite
is "flash.display"
getPackageName in interface IDefinitiongetPackageName in class TypeDefinitionBasepublic IInterfaceDefinition[] resolveInterfacesImpl(ICompilerProject project)
TypeDefinitionBaseresolveInterfacesImpl in class TypeDefinitionBaseproject - the active projectpublic String getQualifiedName()
IDefinition
For example, the fully-qualified name of the class definition
for the class flash.display.Sprite is
"flash.display.Sprite".
getQualifiedName in interface IDefinitiongetQualifiedName in class DefinitionBasepublic IFileSpecification getFileSpecification()
getFileSpecification in class DefinitionBasepublic String getSourcePath()
IDefinitiongetSourcePath in interface IDefinitiongetSourcePath in class DefinitionBaseString for the path.public int getStart()
IDefinitiongetStart in interface IDefinitiongetStart in class DefinitionBaseint for the offset.public int getEnd()
IDefinitiongetEnd in interface IDefinitiongetEnd in class DefinitionBaseint for the offset.public int getLine()
IDefinitiongetLine in interface IDefinitiongetLine in class DefinitionBaseint for the line number.public int getColumn()
IDefinitiongetColumn in interface IDefinitiongetColumn in class DefinitionBaseint for the column number.public int getAbsoluteStart()
IDefinitiongetAbsoluteStart in interface IDefinitiongetAbsoluteStart in class DefinitionBaseint for the offset.public int getAbsoluteEnd()
IDefinitiongetAbsoluteEnd in interface IDefinitiongetAbsoluteEnd in class DefinitionBaseint for the offset.public int getNameEnd()
IDefinitiongetNameEnd in interface IDefinitiongetNameEnd in class DefinitionBaseint for the offset.public int getNameLine()
DefinitionBasegetNameLine in interface IDefinitiongetNameLine in class DefinitionBasepublic int getNameColumn()
DefinitionBasegetNameColumn in interface IDefinitiongetNameColumn in class DefinitionBasepublic String getContainingFilePath()
IDefinitiongetContainingFilePath in interface IDefinitiongetContainingFilePath in class DefinitionBasepublic String getContainingSourceFilePath(ICompilerProject project)
IDefinition
For definitions from a source file (like *.as), the result is the same as
IDefinition.getContainingFilePath().
If the definition is from a SWC library, and the library source path was set, the result is the file path in the source directory. If the source path was not set, the result is null.
getContainingSourceFilePath in interface IDefinitiongetContainingSourceFilePath in class DefinitionBaseproject - the containing projectpublic boolean isTopLevelDefinition()
DefinitionBaseisTopLevelDefinition in class DefinitionBasepublic boolean isFinal()
IDefinitionfinal?isFinal in interface IDefinitionisFinal in class DefinitionBasetrue if the definition is final.public boolean isNative()
IDefinitionnative?isNative in interface IDefinitionisNative in class DefinitionBasetrue if the definition is native.public boolean isOverride()
IDefinitionoverride?isOverride in interface IDefinitionisOverride in class DefinitionBasetrue if the definition is override.public boolean isStatic()
IDefinitionstatic?isStatic in interface IDefinitionisStatic in class DefinitionBasetrue if the definition is static.public boolean hasModifier(ASModifier modifier)
IDefinitionASModifier for the list of modifiers.hasModifier in interface IDefinitionhasModifier in class DefinitionBasetrue if the modifier is present.public boolean hasNamespace(INamespaceReference namespace, ICompilerProject project)
IDefinition
Namespaces include public, private,
protected, and internal, plus any custom
namespaces available in the definition's scope.
The namespace is specified by an INamespaceReference, which can represent
not only a custom namespace like ns1 but also
ns1::ns2, (ns1::ns2)::ns3, etc.
hasNamespace in interface IDefinitionhasNamespace in class DefinitionBasenamespace - An INamespaceReference specifying the namespace to check
for.true if the namespace is present.public INamespaceReference getNamespaceReference()
IDefinitiongetNamespaceReference in interface IDefinitiongetNamespaceReference in class DefinitionBase== NamespaceDefinition.getPublic(),
instanceof IPublicNamespaceDefinition,
instanceof IProtectedNamespaceDefinition, or For a custom
namespace, the INamespaceReference will represent an expression of the
form ns1, ns1::ns2,
(ns1::ns2)::ns3, etc.public IMetaTag[] getAllMetaTags()
IDefinitionIMetaTagNode objects as an arraygetAllMetaTags in interface IDefinitiongetAllMetaTags in class DefinitionBasepublic IMetaTag[] getMetaTagsByName(String name)
IDefinitionIMetaTagNode objects that match the given namegetMetaTagsByName in interface IDefinitiongetMetaTagsByName in class DefinitionBasename - the name to match, such as Event, Style, IconFile, etcIMetaTagNode objects, or empty array (never
null)public boolean hasMetaTagByName(String name)
IDefinitionIMetaTagNode exists in this collectionhasMetaTagByName in interface IDefinitionhasMetaTagByName in class DefinitionBasename - the name of the tagpublic IMetaTag getMetaTagByName(String name)
IDefinitionIMetaTagNode matching the given namegetMetaTagByName in interface IDefinitiongetMetaTagByName in class DefinitionBasename - the name to search forIMetaTagNode or nullpublic boolean hasExplicitComment()
IDocumentableDefinitionhasExplicitComment in interface IDocumentableDefinitionhasExplicitComment in class DefinitionBasepublic ASFileScope getFileScope()
getFileScope in class DefinitionBasepublic ModifiersSet getModifiers()
getModifiers in interface IDefinitiongetModifiers in class DefinitionBasepublic String getBaseName()
IDefinition
For example, the base name of the class definition
for the class flash.display.Sprite
is "Sprite".
getBaseName in interface IDefinitiongetBaseName in class DefinitionBasepublic IASScope getContainingScope()
IDefinitiongetContainingScope in interface IDefinitiongetContainingScope in class DefinitionBasenull if
this definition has not yet been added to a scope.public INamespaceDefinition getProtectedNamespaceReference()
ITypeDefinitionINamespaceDefinition that represents the protected
namespace for this type.INamespaceDefinition that represents the protected
namespace for this type.public INamespaceDefinition getStaticProtectedNamespaceReference()
ITypeDefinitionINamespaceDefinition that represents the static
protected namespace for this type.INamespaceDefinition that represents the static
protected namespace for this type.protected String getLocationString()
getLocationString in class DefinitionBaseprotected String getNamespaceReferenceAsString()
getNamespaceReferenceAsString in class DefinitionBasepublic boolean isInProject(ICompilerProject project)
IDefinitionisInProject in interface IDefinitionisInProject in class DefinitionBaseCopyright © 2016 The Apache Software Foundation. All rights reserved.