public final class AppliedVectorDefinition extends ClassDefinitionBase implements IAppliedVectorDefinition
ClassDefinitionBase.ClassIteratorTypeDefinitionBase.StaticTypeIterator, TypeDefinitionBase.TypeIteratorIClassDefinition.ClassClassification, IClassDefinition.IClassIteratorFLAG_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, singletonEmptyMetaTagsANY_TYPE, NULL, UNDEFINED, VOID| Constructor and Description | 
|---|
| AppliedVectorDefinition(ICompilerProject project,
                       IClassDefinition baseClass,
                       ITypeDefinition elementType)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | adjustVectorMethods(ICompilerProject project)Copy down definitions from Vector$object into the instantiated class as
 we go, modify to the parameter and return types to match what is actually
 expected (Vector$object becomes Vector. | 
| IEffectDefinition[] | findEffectDefinitions(ICompilerProject project)Finds the effect definitions for effect declared on this class or any of
 its superclasses. | 
| IEventDefinition[] | findEventDefinitions(ICompilerProject project)Finds the event definitions for events declared on this class or any of
 its superclasses. | 
| IMetaTag[] | findSkinParts(ICompilerProject project,
             Collection<ICompilerProblem> problems)Finds the skin parts declared on this class or any of its superclasses. | 
| String[] | findSkinStates(ICompilerProject project,
              Collection<ICompilerProblem> problems)Finds the skin state names declared on this class or any of its
 superclasses. | 
| Set<String> | findStateNames(ICompilerProject project)Finds the state names declared on this class or any of its superclasses. | 
| IStyleDefinition[] | findStyleDefinitions(ICompilerProject project)Finds the style definitions for styles declared on this class or any of
 its superclasses. | 
| String | getBaseClassAsDisplayString()Converts this class's  IReferencefor its base class
 to a human-readable String. | 
| String | getBaseClassName() | 
| IReference | getBaseClassReference()Gets a reference to the base class for this class. | 
| String | getBaseName()Gets the base (i.e., unqualified) name of this definition. | 
| IClassDefinition.ClassClassification | getClassClassification()Returns the classification of this ActionScript class | 
| IFunctionDefinition | getConstructor()Gets the constructor function for this class. | 
| String | getDefaultPropertyName() | 
| String | getDefaultPropertyName(ICompilerProject project)Gets the name of the default property for this class. | 
| IEffectDefinition | getEffectDefinition(IWorkspace w,
                   String name)Gets an effect definition for an effect declared on this class with a
 particular name such as  "moveEffect". | 
| IEffectDefinition[] | getEffectDefinitions(IWorkspace w)Gets the effect definitions for effects declared on this class. | 
| IEventDefinition | getEventDefinition(IWorkspace w,
                  String name)Gets an event definition for an event declared on this class with a
 particular name such as  "click". | 
| IEventDefinition[] | getEventDefinitions(IWorkspace w)Gets the event definitions for events declared on this class. | 
| IExpressionNode[] | getImplementedInterfaceNodes() | 
| IReference[] | getImplementedInterfaceReferences()Returns  IReferenceobjects that will resolve to any interface this
 class directly implements. | 
| String[] | getImplementedInterfacesAsDisplayStrings()Returns the names of any interfaces that this class directly references. | 
| IMetaTag[] | getMetaTagsByName(String name)Gets all the  IMetaTagNodeobjects that match the given name | 
| Name | getMName(ICompilerProject project)Generate an AET Name object for this definition, and log any Problems
 encountered while constructing the Name, to the list of problems passed
 in. | 
| String | getPackageName()Gets the fully-qualified package name for this definition. | 
| ICompilerProject | getProject()Gets the  ICompilerProjectthat thisAppliedVectorDefinitionwas created for. | 
| static ICompilerProject | getProjectIfVectorInsantiation(IDefinition def)Determines if the specified definition is a vector instantiation or a
 contained by a vector instantiation. | 
| INamespaceDefinition | getProtectedNamespaceReference()Gets the  INamespaceDefinitionthat represents the protected
 namespace for this type. | 
| String | getQualifiedName()Gets the fully-qualified name of this definition. | 
| IMetaTag[] | getSkinParts(Collection<ICompilerProblem> problems)Gets the skin parts declared on this class. | 
| String[] | getSkinStates(Collection<ICompilerProblem> problems)Gets the skin state names declared on this class. | 
| Set<String> | getStateNames()Gets the state names declared on this class. | 
| INamespaceDefinition | getStaticProtectedNamespaceReference()Gets the  INamespaceDefinitionthat represents the static
 protected namespace for this type. | 
| IStyleDefinition | getStyleDefinition(IWorkspace w,
                  String name)Gets a style definition for a style declared on this class with a
 particular name such as  "fontSize". | 
| IStyleDefinition[] | getStyleDefinitions(IWorkspace w)Gets the style definitions for styles declared on this class. | 
| boolean | isImplicit()Is this definition an implicit definition that doesn't actually appear in
 the source file? | 
| boolean | isInProject(ICompilerProject project)Debugging method that can be used to assert that a definition is a specified project. | 
| static boolean | isVectorScope(ASScope scope) | 
| static IClassDefinition | lookupVectorImplClass(ICompilerProject project,
                     String baseName)Returns the class definition for Vector$object, Vector$int, Vector$uint, or Vector$double. | 
| IClassDefinition[] | resolveAncestry(ICompilerProject project)Get the ancestral stack for this class, from this class all the way to
 Object. | 
| IClassDefinition | resolveBaseClass(ICompilerProject project)Finds the definition of the base class for this class. | 
| ITypeDefinition | resolveElementType(ICompilerProject project)Resolves the class or interface definition that represents
 the type of the vector's elements. | 
| IClassDefinition | resolveHostComponent(ICompilerProject project)Finds the  IClassDefinitionfor the host component class, declared with[HostComponent(...)] | 
| protected TypeDefinitionBase | resolveType(String typeName,
           ICompilerProject project,
           DependencyType dt)This helper method resolves type references in definitions (i.e., Strings
 such as "int", "Sprite", or "flash.events.IEventDispatcher" that are
 stored as references to a class or interface) to the definition of the
 specified type. | 
| ExpressionNodeBase | toExpression()Returns the expression that represents the value of this vector | 
| protected String | toStorageName(String name) | 
| TypedExpressionNode | toTypedExpression()Returns a typed expression that represents the signature of this Vector | 
| void | updateBaseClass(String changedVectorImplClass)Updates the base class of this  AppliedVectorDefinitionif the
 vector base name of the base class matches the base name of the vector
 implementation class that has changed. | 
| static boolean | vectorInstanceOfCheck(ITypeDefinition base,
                     ITypeDefinition derived)Helper method that implements special instanceOf checks for Vector types. | 
classIterable, classIterator, computeNeedsEventDispatcher, findMetaTagsByName, getAlternativeClasses, getIconFile, interfaceIterator, isInstanceOf, needsEventDispatcher, needsStaticEventDispatcher, resolveAllInterfaces, resolveImplementedInterface, resolveImplementedInterfaces, resolveImplementedInterfaces, resolveImplementedInterfaces, resolveInterfacesImplfilterNullInterfaces, getNameStart, getNode, isInstanceOf, resolveType, staticTypeIterable, typeIteratablegetContainedScope, setContainedScope, verifyaddMetaTag, buildInnerString, buildString, getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getArrayElementType, getBindableEventNames, getColumn, getContainingASScope, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDefinition, getDeprecationInfo, getEnd, getExplicitSourceComment, getFileScope, getFileSpecification, getInstanceType, getLine, getLocationString, getMaxSize, getMetaTagByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNamespaceReferenceAsString, getParent, getPercentProxy, getSize, getSkinPart, getSourcePath, getStart, getStorageName, getTypeAsDisplayString, getTypeDependencyType, getTypeReference, hasCollapseWhiteSpace, hasExplicitComment, hasMetaTagByName, hasModifier, hasNamespace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isDynamic, isEmpty, isFinal, isGeneratedEmbedClass, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, matches, resolveNamespace, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toString, unsetOverrideclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclassIterator, findMetaTagsByName, getAlternativeClasses, getIconFile, interfaceIterator, needsEventDispatcher, needsStaticEventDispatcher, resolveImplementedInterfacesgetNode, isInstanceOf, isInstanceOf, resolveAllInterfaces, typeIteratablegetContainedScopegetExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getParent, getSourcePath, getStart, getTypeAsDisplayString, getTypeReference, hasMetaTagByName, hasModifier, hasNamespace, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isDynamic, isFinal, isGeneratedEmbedClass, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isStatic, resolveNamespace, resolveTypepublic AppliedVectorDefinition(ICompilerProject project, IClassDefinition baseClass, ITypeDefinition elementType)
Don't call this constructor from anywhere other than the ASProjectScope.
project - The compiler projectbaseClass - The base class for the vector type, such as Vector$int.elementType - The definition for the element type.protected String toStorageName(String name)
toStorageName in class DefinitionBasepublic IReference getBaseClassReference()
IClassDefinitiongetBaseClassReference in interface IClassDefinitionIReference referring to the base class.protected TypeDefinitionBase resolveType(String typeName, ICompilerProject project, DependencyType dt)
DefinitionBaseIt is called by
resolveType() in DefinitionBase to resolve a type
 annotation such as the "int" on a declaration like
 public var foo:int;resolveReturnType() in FunctionDefinition to resolve the
 return type of a function declaration;resolveBaseClass() in ClassDefinition to resolve
 extends clause of a class declaration;resolveImplementedInterfaces() in ClassDefinition to
 resolve the implements clause of a class declaration;resolveTypeParameters() in ParameterizedClassDefinition
 to resolve the type of a Vector;resolveExtendedInterfaces() in InterfaceDefinition to
 resolve the extends clause of an interface declaration.resolveType in class DefinitionBasetypeName - The name of the type to resolve.project - The compiler project.dt - The type of dependency to be created.public final 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 final 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 final 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 boolean isImplicit()
IDefinitionthis, super,
 default constructors, and cast functions.isImplicit in interface IDefinitionisImplicit in class DefinitionBasepublic IClassDefinition[] resolveAncestry(ICompilerProject project)
IClassDefinitionresolveAncestry in interface IClassDefinitionresolveAncestry in class ClassDefinitionBasepublic String getBaseClassName()
public IClassDefinition.ClassClassification getClassClassification()
IClassDefinitiongetClassClassification in interface IClassDefinitionIClassDefinition.ClassClassification objectpublic String[] getImplementedInterfacesAsDisplayStrings()
IClassDefinitiongetImplementedInterfacesAsDisplayStrings in interface IClassDefinitionpublic IReference[] getImplementedInterfaceReferences()
IClassDefinitionIReference objects that will resolve to any interface this
 class directly implements. This does not walk of the inheritance chain.getImplementedInterfaceReferences in interface IClassDefinitiongetImplementedInterfaceReferences in class ClassDefinitionBaseIReference objects, or an empty array.public IExpressionNode[] getImplementedInterfaceNodes()
public 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 ITypeDefinition resolveElementType(ICompilerProject project)
IAppliedVectorDefinitionresolveElementType in interface IAppliedVectorDefinitionproject - The ICompilerProject to use for resolving references.ITypeDefinition for the class or interface definition
 representing the type of the vector's elements.public ExpressionNodeBase toExpression()
public TypedExpressionNode toTypedExpression()
TypedExpressionNodepublic String getBaseClassAsDisplayString()
IClassDefinitionIReference for its base class
 to a human-readable String.
 If this class does not have a base class reference, this method returns the empty string.
This method should only be used for displaying the base class, and not for making semantic decisions.
getBaseClassAsDisplayString in interface IClassDefinitionIReference.getDisplayString()()
 on the IReference representing this class's base class.public IClassDefinition resolveBaseClass(ICompilerProject project)
IClassDefinition
 Note that Object does not have a base class, so this method
 returns null if called on the class definition for
 Object.
 
 It will also return null in the following error cases:
 
 Note: SemanticUtils.resolveBaseClass(org.apache.flex.compiler.tree.as.ICommonClassNode, org.apache.flex.compiler.internal.definitions.ClassDefinition, org.apache.flex.compiler.projects.ICompilerProject, java.util.Collection<org.apache.flex.compiler.problems.ICompilerProblem>) is similar, but actually
 reports the various error cases as problems, and returns
 Object instead of null in the error cases so
 that the code generator gives the class a valid superclass.
resolveBaseClass in interface IClassDefinitionIClassDefinition or null.public String getDefaultPropertyName()
public INamespaceDefinition getProtectedNamespaceReference()
ITypeDefinitionINamespaceDefinition that represents the protected
 namespace for this type.getProtectedNamespaceReference in interface ITypeDefinitionINamespaceDefinition that represents the protected
 namespace for this type.public INamespaceDefinition getStaticProtectedNamespaceReference()
ITypeDefinitionINamespaceDefinition that represents the static
 protected namespace for this type.getStaticProtectedNamespaceReference in interface ITypeDefinitionINamespaceDefinition that represents the static
 protected namespace for this type.public IEventDefinition getEventDefinition(IWorkspace w, String name)
IClassDefinition"click".
 
 If there is no such event, this method returns null.
 
This method does not find events defined on superclasses.
getEventDefinition in interface IClassDefinitionname - The name of the event.IEventDefinition object.public IEventDefinition[] getEventDefinitions(IWorkspace w)
IClassDefinitionIf there are no events declared, this method returns an empty array.
This method does not find events defined on superclasses.
getEventDefinitions in interface IClassDefinitionIEventDefinition objects.public IEventDefinition[] findEventDefinitions(ICompilerProject project)
IClassDefinitionIf there are no events declared, this method returns an empty array.
The event definitions returned are guaranteed to have unique event names. If an event is declared with the same name on a superclass and a subclass, the event on the subclass overrides the one on the superclass.
findEventDefinitions in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.IEventDefinition objects.public IStyleDefinition getStyleDefinition(IWorkspace w, String name)
IClassDefinition"fontSize".
 
 If there is no such style, this method returns null.
 
This method does not find styles defined on superclasses.
getStyleDefinition in interface IClassDefinitionname - The name of the style.IStyleDefinition object.public IStyleDefinition[] getStyleDefinitions(IWorkspace w)
IClassDefinitionIf there are no styles declared, this method returns an empty array.
This method does not find styles defined on superclasses.
getStyleDefinitions in interface IClassDefinitionIStyleDefinition objects.public IStyleDefinition[] findStyleDefinitions(ICompilerProject project)
IClassDefinitionIf there are no styles declared, this method returns an empty array.
The style definitions returned are guaranteed to have unique style names. If a style is declared with the same name on a superclass and a subclass, the style on the subclass overrides the one on the superclass.
findStyleDefinitions in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.IStyleDefinition objects.public IEffectDefinition getEffectDefinition(IWorkspace w, String name)
IClassDefinition"moveEffect".
 
 If there is no such effect, this method returns null.
 
This method does not find effects defined on superclasses.
getEffectDefinition in interface IClassDefinitionname - The name of the effect.IEffectDefinition object.public IEffectDefinition[] getEffectDefinitions(IWorkspace w)
IClassDefinitionIf there are no effects declared, this method returns an empty array.
This method does not find effects defined on superclasses.
getEffectDefinitions in interface IClassDefinitionIEffectDefinition objects.public IEffectDefinition[] findEffectDefinitions(ICompilerProject project)
IClassDefinitionIf there are no effects declared, this method returns an empty array.
The effect definitions returned are guaranteed to have unique effect names. If an effect is declared with the same name on a superclass and a subclass, the effect on the subclass overrides the one on the superclass.
findEffectDefinitions in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.IEffectDefinition objects.public String[] getSkinStates(Collection<ICompilerProblem> problems)
IClassDefinitionIf there are no skin states declared, this method returns an empty array.
This method does not find skin states defined on superclasses.
getSkinStates in interface IClassDefinitionString objects.public String[] findSkinStates(ICompilerProject project, Collection<ICompilerProblem> problems)
IClassDefinitionIf there are no skin states declared, this method returns an empty array.
The state names returned are guaranteed to have unique names with no duplicates.
findSkinStates in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.String objects.public IMetaTag[] getSkinParts(Collection<ICompilerProblem> problems)
IClassDefinitionIf there are no skin parts declared, this method returns an empty array.
This method does not find skin parts defined on superclasses.
getSkinParts in interface IClassDefinitionIMetaTag objects.public IMetaTag[] findSkinParts(ICompilerProject project, Collection<ICompilerProblem> problems)
IClassDefinitionIf there are no skin parts declared, this method returns an empty array.
The skin parts returned are guaranteed to have unique names. If a skin part is declared with the same name on a superclass and a subclass, the skin part on the subclass overrides the one on the superclass.
findSkinParts in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.IVariableDefinition objects.public Set<String> getStateNames()
IClassDefinitionIf there are no states declared, this method returns an empty set.
This method does not find states defined on superclasses.
getStateNames in interface IClassDefinitionString objects.public Set<String> findStateNames(ICompilerProject project)
IClassDefinitionIf there are no states declared, this method returns an empty set.
findStateNames in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain.String objects.public Name getMName(ICompilerProject project)
DefinitionBasegetMName in class DefinitionBaseproject - the Project to use when resolving the Definitions
 Namespacepublic void adjustVectorMethods(ICompilerProject project)
project - Project we are inpublic ICompilerProject getProject()
ICompilerProject that this
 AppliedVectorDefinition was created for.ICompilerProject that this
 AppliedVectorDefinition was created forpublic String getDefaultPropertyName(ICompilerProject project)
IClassDefinitiongetDefaultPropertyName in interface IClassDefinitionpublic static ICompilerProject getProjectIfVectorInsantiation(IDefinition def)
def - IDefinition to check.public static boolean isVectorScope(ASScope scope)
public IFunctionDefinition getConstructor()
IClassDefinitiongetConstructor in interface IClassDefinitionIFunctionDefinition representing the constructor.public IClassDefinition resolveHostComponent(ICompilerProject project)
IClassDefinitionIClassDefinition for the host component class, declared with [HostComponent(...)] metadata on
 this class or one of its superclasses.
 
 If there is no [HostComponent(...)] metadata on this class or any of its superclasses, this method returns null.
resolveHostComponent in interface IClassDefinitionproject - An ICompilerProject object used to determine the
 superclass chain and to resolve the class referenced in the [HostComponent(...)] metadata.IClassDefinition for the host component class.public static boolean vectorInstanceOfCheck(ITypeDefinition base, ITypeDefinition derived)
 This method aliases the Vector$XXXX where XXXX is double, uint, or int to
 Vector.
base - ITypeDefinition for the base type in the instanceOf
 check.derived - ITypeDefinition for the dervied type in the
 instanceOf check.public boolean isInProject(ICompilerProject project)
IDefinitionisInProject in interface IDefinitionisInProject in class DefinitionBasepublic static IClassDefinition lookupVectorImplClass(ICompilerProject project, String baseName)
public void updateBaseClass(String changedVectorImplClass)
AppliedVectorDefinition if the
 vector base name of the base class matches the base name of the vector
 implementation class that has changed.changedVectorImplClass - base name of the vector implementation
 class that has changed.Copyright © 2016 The Apache Software Foundation. All rights reserved.