public class BottomResolvedOperation extends AbstractResolvedOperation
JvmOperation
.Constructor and Description |
---|
BottomResolvedOperation(JvmOperation declaration,
LightweightTypeReference contextType,
OverrideTester overrideTester) |
Modifier and Type | Method and Description |
---|---|
IResolvedOperation |
getAsBottom()
Returns the current method as a
bottom method . |
protected BottomResolvedOperation |
getBottom() |
IOverrideCheckResult |
getOverrideCheckResult()
The override check result that is associated with this operation.
|
protected OverrideTester |
getOverrideTester() |
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. |
createResolvedOperationInHierarchy, getIllegallyDeclaredExceptions, getOverriddenAndImplementedMethodCandidates, getOverriddenAndImplementedMethods, getOverriddenMethod, getResolvedReturnType, getResolvedTypeParameterConstraints, getResolvedTypeParameters, isIllegallyDeclaredException, isOverridingOrImplementing, isRawTypeInheritance, isResolvedTypeParameter
getResolvedErasureSignature, getResolvedExceptions, getResolvedParameterTypes, getResolvedSignature, getSimpleSignature, getTypeParameters, toString
computeContextTypeParameterMapping, getContextType, getContextTypeParameterMapping, getDeclaration, getResolvedDeclarator, getResolvedReference, getResolvedReferences, getSubstitutor, isResolvedTypeParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDeclaration
getResolvedExceptions, getResolvedParameterTypes, getTypeParameters
getContextType, getResolvedDeclarator, getResolvedErasureSignature, getResolvedSignature, getSimpleSignature
public BottomResolvedOperation(JvmOperation declaration, LightweightTypeReference contextType, OverrideTester overrideTester)
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()
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 BottomResolvedOperation getBottom()
getBottom
in class AbstractResolvedOperation
protected OverrideTester getOverrideTester()
getOverrideTester
in class AbstractResolvedOperation
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.