public class ResolvedQualifiersReference extends Object implements IResolvedQualifiersReference
IReference
representing a reference where all the
qualifiers have been resolved to namespace definitions.Constructor and Description |
---|
ResolvedQualifiersReference(com.google.common.collect.ImmutableSet<INamespaceDefinition> qualifiers,
String baseName)
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()
Gets the AET
Name that this reference represents. |
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.
|
com.google.common.collect.ImmutableSet<INamespaceDefinition> |
getQualifiers()
Gets the resolved qualifiers for this reference.
|
boolean |
matches(IResolvedQualifiersReference toMatch)
Determines if base name of this
IResolvedQualifiersReference
matches the base name of the specified
IResolvedQualifiersReference and at least one qualifier in
the specified IResolvedQualifiersReference is in the set of
qualifiers in this IResolvedQualifiersReference . |
IDefinition |
resolve(ICompilerProject project)
Resolves this reference to a definition in the given project.
|
IDefinition |
resolve(ICompilerProject project,
ASScope scope,
DependencyType dependencyType,
boolean canEscapeWith)
Resolves the reference to its
IDefinition in the given project
and scope. |
IDefinition |
resolve(ICompilerProject project,
ICompilationUnit referencingCompilationUnit,
DependencyType dt)
Resolves this reference to a definition in the given project.
|
public ResolvedQualifiersReference(com.google.common.collect.ImmutableSet<INamespaceDefinition> qualifiers, String baseName)
public String getName()
IReference
getName
in interface IReference
String.
public IDefinition resolve(ICompilerProject project, ASScope scope, DependencyType dependencyType, 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.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.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 referencepublic IDefinition resolve(ICompilerProject project, ICompilationUnit referencingCompilationUnit, DependencyType dt)
IResolvedQualifiersReference
resolve
in interface IResolvedQualifiersReference
project
- The ICompilerProject
in which to resolve the
reference.referencingCompilationUnit
- The ICompilationUnit
where the
resolution occurs.dt
- The type of dependency to introduce if this
resolves.IDefinition
the reference resolves to.public IDefinition resolve(ICompilerProject project)
IResolvedQualifiersReference
resolve
in interface IResolvedQualifiersReference
project
- The project in which to resolve the reference.public Name getMName()
IResolvedQualifiersReference
Name
that this reference represents.getMName
in interface IResolvedQualifiersReference
Name
representing this reference.public com.google.common.collect.ImmutableSet<INamespaceDefinition> getQualifiers()
IResolvedQualifiersReference
getQualifiers
in interface IResolvedQualifiersReference
INamespaceDefinition
qualifiers.public boolean matches(IResolvedQualifiersReference toMatch)
IResolvedQualifiersReference
IResolvedQualifiersReference
matches the base name of the specified
IResolvedQualifiersReference
and at least one qualifier in
the specified IResolvedQualifiersReference
is in the set of
qualifiers in this IResolvedQualifiersReference
.matches
in interface IResolvedQualifiersReference
toMatch
- IResolvedQualifiersReference
to test.IResolvedQualifiersReference
is not equal to the base name in the
specified IResolvedQualifiersReference
, false if none qualifiers
of the specified IResolvedQualifiersReference
are in the set of
qualifiers in this IResolvedQualifiersReference
, true otherwise.Copyright © 2016 The Apache Software Foundation. All rights reserved.