public class ResolvedOperationInHierarchy extends AbstractResolvedOperation
| Modifier | Constructor and Description |
|---|---|
protected |
ResolvedOperationInHierarchy(org.eclipse.xtext.common.types.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<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> |
getContextTypeParameterMapping() |
IOverrideCheckResult |
getOverrideCheckResult()
The override check result that is associated with this operation.
|
java.util.List<org.eclipse.xtext.common.types.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, isIllegallyDeclaredException, isOverridingOrImplementing, isRawTypeInheritance, isResolvedTypeParametergetResolvedErasureSignature, getResolvedExceptions, getResolvedParameterTypes, getResolvedSignature, getSimpleSignature, getTypeParameterscomputeContextTypeParameterMapping, getContextType, getDeclaration, getResolvedDeclarator, getResolvedReference, getResolvedReferences, isResolvedTypeParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDeclarationgetResolvedExceptions, getResolvedParameterTypes, getTypeParametersgetContextType, getResolvedDeclarator, getResolvedErasureSignature, getResolvedSignature, getSimpleSignatureprotected ResolvedOperationInHierarchy(org.eclipse.xtext.common.types.JvmOperation declaration,
BottomResolvedOperation bottom)
public java.util.List<org.eclipse.xtext.common.types.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 IResolvedOperationgetResolvedTypeParameters in class AbstractResolvedOperationpublic boolean isBottomInContext()
IResolvedOperationtrue 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 AbstractResolvedOperationpublic IResolvedOperation getAsBottom()
IResolvedOperationbottom 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<org.eclipse.xtext.common.types.JvmOperation>protected java.util.Map<org.eclipse.xtext.common.types.JvmTypeParameter,LightweightMergedBoundTypeArgument> getContextTypeParameterMapping()
getContextTypeParameterMapping in class AbstractResolvedFeature<org.eclipse.xtext.common.types.JvmOperation>public IOverrideCheckResult getOverrideCheckResult()
IResolvedOperationbottom, 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<org.eclipse.xtext.common.types.JvmOperation>