public class InterfaceDefinition extends TypeDefinitionBase implements IInterfaceDefinition
After an interface definition is in the symbol table, it should always be
accessed through the read-only IInterfaceDefinition
interface.
Modifier and Type | Class and Description |
---|---|
static class |
InterfaceDefinition.InterfaceIterator
Iterates over all the Interfaces that are implemented/extended by a given
interface/class If a problem collection is passed in, will detect
circular dependencies.
|
TypeDefinitionBase.StaticTypeIterator, TypeDefinitionBase.TypeIterator
IInterfaceDefinition.InterfaceClassification
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 |
---|
InterfaceDefinition(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildInnerString(StringBuilder sb)
For debugging only.
|
IReference[] |
getExtendedInterfaceReferences()
Returns
IReference objects that will resolve to any interface this
interface directly extends. |
String[] |
getExtendedInterfacesAsDisplayStrings()
Returns the names of any interfaces that this interface
directly references.
|
IInterfaceDefinition.InterfaceClassification |
getInterfaceClassification()
Returns the classification of this ActionScript interface
|
INamespaceDefinition.ILanguageNamespaceDefinition |
getInterfaceNamespaceReference()
Get the namespace representing the special interface namespace.
|
Set<INamespaceDefinition> |
getInterfaceNamespaceSet(ICompilerProject project)
Generate a namespace set to use for references through a reference with a
static type of an interface.
|
INamespaceDefinition |
getProtectedNamespaceReference()
Gets the
INamespaceDefinition that represents the protected
namespace for this type. |
INamespaceDefinition |
getStaticProtectedNamespaceReference()
Gets the
INamespaceDefinition that represents the static
protected namespace for this type. |
Iterator<IInterfaceDefinition> |
interfaceIterator(ICompilerProject project,
boolean includeThis)
Creates an iterator for enumerating all of the interfaces that this class
implements.
|
Iterator<IInterfaceDefinition> |
interfaceIterator(ICompilerProject project,
boolean includeThis,
Collection<ICompilerProblem> problems) |
boolean |
isInstanceOf(ITypeDefinition type,
ICompilerProject project)
Determines whether an "is-a" relationship exists between two classes or
interfaces.
|
boolean |
matches(DefinitionBase node) |
Set<IInterfaceDefinition> |
resolveAllInterfaces(ICompilerProject project) |
IInterfaceDefinition[] |
resolveExtendedInterfaces(ICompilerProject project)
Get the definitions of the extended interfaces.
|
IInterfaceDefinition[] |
resolveInterfacesImpl(ICompilerProject project)
resolve the interfaces this interface extends
|
void |
setExtendedInterfaceReferences(IReference[] extendedInterfaces) |
void |
setNamespaceReference(INamespaceReference value) |
void |
validateClassImplementsAllMethods(ICompilerProject project,
ClassDefinition cls,
Collection<ICompilerProblem> problems)
Method to find all the methods declared in this interface, and validate
that the class definition passed in implements those methods, and that
they are implemented with compatible signatures
|
filterNullInterfaces, getNameStart, getNode, getPackageName, isInstanceOf, resolveType, staticTypeIterable, typeIteratable
getContainedScope, setContainedScope, verify
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, getParent, getPercentProxy, getQualifiedName, 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, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, resolveNamespace, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toStorageName, toString, unsetOverride
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNode, isInstanceOf, typeIteratable
getContainedScope
getExplicitSourceComment, hasExplicitComment
getAbsoluteEnd, 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, resolveType
public InterfaceDefinition(String name)
public IInterfaceDefinition.InterfaceClassification getInterfaceClassification()
IInterfaceDefinition
getInterfaceClassification
in interface IInterfaceDefinition
IInterfaceDefinition.InterfaceClassification
public String[] getExtendedInterfacesAsDisplayStrings()
IInterfaceDefinition
getExtendedInterfacesAsDisplayStrings
in interface IInterfaceDefinition
public void setExtendedInterfaceReferences(IReference[] extendedInterfaces)
public IReference[] getExtendedInterfaceReferences()
IInterfaceDefinition
IReference
objects that will resolve to any interface this
interface directly extends. This does not walk of the inheritance chain.getExtendedInterfaceReferences
in interface IInterfaceDefinition
IReference
objects, or an empty array.public IInterfaceDefinition[] resolveExtendedInterfaces(ICompilerProject project)
IInterfaceDefinition
resolveExtendedInterfaces
in interface IInterfaceDefinition
public IInterfaceDefinition[] resolveInterfacesImpl(ICompilerProject project)
resolveInterfacesImpl
in class TypeDefinitionBase
project
- the active projectpublic boolean isInstanceOf(ITypeDefinition type, ICompilerProject project)
ITypeDefinition
If this
is an IClassDefinition
and type
is an IClassDefinition
, this method determines whether
this
is a subclass of type
.
If this
is an IClassDefinition
and type
is an IInterfaceDefinition
, this method determines whether
this
is implements type
.
If this
is an IInterfaceDefinition
and
type
is an IInterfaceDefinition
, this method
determines whether this
is a subinterface of
type
.
A class or interface is considered an instance of itself.
isInstanceOf
in interface ITypeDefinition
type
- An ITypeDefinition
representing a class or interface.project
- The ICompilerProject
within which references should
be resolvedpublic Set<IInterfaceDefinition> resolveAllInterfaces(ICompilerProject project)
resolveAllInterfaces
in interface ITypeDefinition
public Iterator<IInterfaceDefinition> interfaceIterator(ICompilerProject project, boolean includeThis)
IInterfaceDefinition
interfaceIterator
in interface IInterfaceDefinition
project
- The ICompilerProject
within which references
should be resolvedincludeThis
- A flag indicating whether the enumeration should start
with this interface rather with than its first superinterface.IInterfaceDefinition
objects.public Iterator<IInterfaceDefinition> interfaceIterator(ICompilerProject project, boolean includeThis, Collection<ICompilerProblem> problems)
public INamespaceDefinition getProtectedNamespaceReference()
ITypeDefinition
INamespaceDefinition
that represents the protected
namespace for this type.getProtectedNamespaceReference
in interface ITypeDefinition
INamespaceDefinition
that represents the protected
namespace for this type.public INamespaceDefinition getStaticProtectedNamespaceReference()
ITypeDefinition
INamespaceDefinition
that represents the static
protected namespace for this type.getStaticProtectedNamespaceReference
in interface ITypeDefinition
INamespaceDefinition
that represents the static
protected namespace for this type.public INamespaceDefinition.ILanguageNamespaceDefinition getInterfaceNamespaceReference()
public Set<INamespaceDefinition> getInterfaceNamespaceSet(ICompilerProject project)
project
- Project to use to resolve base interfacespublic void setNamespaceReference(INamespaceReference value)
setNamespaceReference
in class DefinitionBase
public void validateClassImplementsAllMethods(ICompilerProject project, ClassDefinition cls, Collection<ICompilerProblem> problems)
cls
- the class definition to checkproblems
- a list of problems to report errors toprotected void buildInnerString(StringBuilder sb)
public interface I extends I1, I2
.buildInnerString
in class DefinitionBase
public boolean matches(DefinitionBase node)
matches
in class DefinitionBase
Copyright © 2016 The Apache Software Foundation. All rights reserved.