public interface IReference
IReference represents a reference-by-name to an
IDefinition.
References are used by the various definition classes to refer to other
definitions; for example, ClassDefinition stores a reference to
its base class and VariableDefinition stores a reference to its
type.
A reference can resolve to different definitions in different projects. For
example, a reference to the Object class might resolve to the
Object class from playerglobal.swc in a web project
and to the Object class from airglobal.swc in an
AIR project.
There are a variety of implementations of this interface that represent different kinds of references, such as unqualified names, multinames, etc.
To construct an IReference, use the methods in
ReferenceFactory.
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayString()
Gets a string representation of this reference suitable for display
in the description of a compiler problem.
|
Name |
getMName(ICompilerProject project,
ASScope scope)
Gets the AET {link Name} that this reference represents in the given
project and scope.
|
String |
getName()
Gets the base name for this reference.
|
IDefinition |
resolve(ICompilerProject project,
ASScope scope,
DependencyType dependencyType,
boolean canEscapeWith)
Resolves the reference to its
IDefinition in the given project
and scope. |
String getName()
String.IDefinition resolve(ICompilerProject project, ASScope scope, DependencyType dependencyType, boolean canEscapeWith)
IDefinition in the given project
and scope.project - The project in which to resolve the reference.scope - The scope where the resolution is occurring.dependencyType - The type of dependency to introduce if the reference
resolves outside of the compilation unit.canEscapeWith - Whether the resolution should look past a
with scope.IDefinition the reference resolves to.String getDisplayString()
Name getMName(ICompilerProject project, ASScope scope)
project - The project where the reference is used.scope - The scope where the reference is used from.Name representing this referenceCopyright © 2016 The Apache Software Foundation. All rights reserved.