public class ResolvedOperationInHierarchy extends AbstractResolvedOperation
Modifier | Constructor and Description |
---|---|
protected |
ResolvedOperationInHierarchy(JvmOperation declaration,
BottomResolvedOperation bottom) |
Modifier and Type | Method and Description |
---|---|
IResolvedOperation |
getAsBottom()
Returns the current method as a
bottom method . |
protected BottomResolvedOperation |
getBottom() |
protected java.util.Map<JvmTypeParameter,LightweightMergedBoundTypeArgument> |
getContextTypeParameterMapping() |
IOverrideCheckResult |
getOverrideCheckResult()
The override check result that is associated with this operation.
|
java.util.List<JvmTypeParameter> |
getResolvedTypeParameters()
Returns the resolved type parameters for a given operation.
|
protected TypeParameterSubstitutor<?> |
getSubstitutor() |
boolean |
isBottomInContext()
Returns
true if the bottom of this resolved method hierachy, which that there is no specialization
of this method in the current context. |
protected void |
setCheckResult(IOverrideCheckResult checkResult) |
java.lang.String |
toString() |
createResolvedOperationInHierarchy, getIllegallyDeclaredExceptions, getOverriddenAndImplementedMethodCandidates, getOverriddenAndImplementedMethods, getOverriddenMethod, getOverrideTester, getResolvedReturnType, getResolvedTypeParameterConstraints, getThrowableType, isIllegallyDeclaredException, isOverridingOrImplementing, isRawTypeInheritance, isResolvedTypeParameter
getResolvedErasureSignature, getResolvedExceptions, getResolvedParameterTypes, getResolvedSignature, getSimpleSignature, getTypeParameters
computeContextTypeParameterMapping, getContextType, getDeclaration, getResolvedDeclarator, getResolvedReference, getResolvedReferences, isResolvedTypeParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDeclaration
getResolvedExceptions, getResolvedParameterTypes, getTypeParameters
getContextType, getResolvedDeclarator, getResolvedErasureSignature, getResolvedSignature, getSimpleSignature
protected ResolvedOperationInHierarchy(JvmOperation declaration, BottomResolvedOperation bottom)
public java.util.List<JvmTypeParameter> getResolvedTypeParameters()
IResolvedOperation
interface I { <T extends CharSequence> T method() } class C implements I { public <V extends CharSequence> V method() { return null; } }If the initially requested method was
C#method
and the current handle points to
I#method
, the type parameters will contain V
instead of T
.
The list may contain a different number of type parameters than the actual operation.
interface I { <T> T method() } class C implements I { public String method() { return null; } }The method
I#method
in the context of class C
will yield an empty list of resolved type
parameters even though it declares
T
.getResolvedTypeParameters
in interface IResolvedOperation
getResolvedTypeParameters
in class AbstractResolvedOperation
public boolean isBottomInContext()
IResolvedOperation
true
if the bottom of this resolved method hierachy, which that there is no specialization
of this method in the current context.
interface I1 { void m() } interface I2 { void m() } abstract class C implements I1, I2 { }If you get hold on the abstract method
I1#m
or I2#m
both will return true
.IResolvedOperation.getAsBottom()
protected BottomResolvedOperation getBottom()
getBottom
in class AbstractResolvedOperation
public IResolvedOperation getAsBottom()
IResolvedOperation
bottom method
. That implies, that the
context type
of the result is the resolved declarator of the current
declaration
.
interface I<T> { <K> T m(K k); } class C implements I<V< { <U> V m(U u); }If this resolved method represents
I#m
in the context of class C
(thus the return type
will be V
and the resolved type parameters
include
U
, IResolvedOperation.getAsBottom()
will yield I#m
in the context of I<V<
.
That is, the return type is still resolved to V
. Nevertheless, the local type parameter of
I#m
is now resolved to its declaration K
. This implies that the parameter type is no
longer resolved to U
but K
instead. The bottom representation can be used to create
descriptive error messages. If the current resolved method is already a bottom type, it is returned itself.IResolvedOperation.isBottomInContext()
protected TypeParameterSubstitutor<?> getSubstitutor()
getSubstitutor
in class AbstractResolvedFeature<JvmOperation>
protected java.util.Map<JvmTypeParameter,LightweightMergedBoundTypeArgument> getContextTypeParameterMapping()
getContextTypeParameterMapping
in class AbstractResolvedFeature<JvmOperation>
public IOverrideCheckResult getOverrideCheckResult()
IResolvedOperation
bottom
, the details
will only include the
current
detail. In other cases, the actual information about the relationship of the hierarchy function to its
specialization in the context
is returned.protected void setCheckResult(IOverrideCheckResult checkResult)
public java.lang.String toString()
toString
in class AbstractResolvedExecutable<JvmOperation>