public class LexicalReference extends Object implements IReference
IReference
representing a simple, unqualified
reference from a source file such as the type annotation in
var x:String
.Constructor and Description |
---|
LexicalReference(String name)
Constructor.
|
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.
|
Set<INamespaceDefinition> |
getNamespaceSet(ICompilerProject project,
ASScope scope) |
IDefinition |
resolve(ICompilerProject project,
ASScope scope,
DependencyType depencencyType,
boolean canEscapeWith)
Resolves the reference to its
IDefinition in the given project
and scope. |
String |
toString()
For debugging only.
|
public LexicalReference(String name)
public String getName()
IReference
getName
in interface IReference
String.
public Set<INamespaceDefinition> getNamespaceSet(ICompilerProject project, ASScope scope)
public IDefinition resolve(ICompilerProject project, ASScope scope, DependencyType depencencyType, boolean canEscapeWith)
IReference
IDefinition
in the given project
and scope.resolve
in interface IReference
project
- The project in which to resolve the reference.scope
- The scope where the resolution is occurring.depencencyType
- 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.public String getDisplayString()
IReference
getDisplayString
in interface IReference
public Name getMName(ICompilerProject project, ASScope scope)
IReference
getMName
in interface IReference
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.