Class BottomResolvedOperation
- java.lang.Object
-
- org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedFeature<T>
-
- org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedExecutable<org.eclipse.xtext.common.types.JvmOperation>
-
- org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedOperation
-
- org.eclipse.xtext.xbase.typesystem.override.BottomResolvedOperation
-
- All Implemented Interfaces:
IResolvedExecutable,IResolvedFeature,IResolvedOperation
- Direct Known Subclasses:
ConflictingDefaultOperation,InvokedResolvedOperation
public class BottomResolvedOperation extends AbstractResolvedOperation
Resolved bottom representation of aJvmOperation.
-
-
Constructor Summary
Constructors Constructor Description BottomResolvedOperation(org.eclipse.xtext.common.types.JvmOperation declaration, LightweightTypeReference contextType, OverrideTester overrideTester)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IResolvedOperationgetAsBottom()Returns the current method as abottom method.protected BottomResolvedOperationgetBottom()IOverrideCheckResultgetOverrideCheckResult()The override check result that is associated with this operation.protected OverrideTestergetOverrideTester()booleanisBottomInContext()Returnstrueif the bottom of this resolved method hierachy, which that there is no specialization of this method in the current context.-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedOperation
createResolvedOperationInHierarchy, getIllegallyDeclaredExceptions, getOverriddenAndImplementedMethodCandidates, getOverriddenAndImplementedMethods, getOverriddenMethod, getResolvedReturnType, getResolvedTypeParameterConstraints, getResolvedTypeParameters, isIllegallyDeclaredException, isOverridingOrImplementing, isRawTypeInheritance, isResolvedTypeParameter
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedExecutable
getResolvedErasureSignature, getResolvedExceptions, getResolvedParameterTypes, getResolvedSignature, getSimpleSignature, getTypeParameters, toString
-
Methods inherited from class org.eclipse.xtext.xbase.typesystem.override.AbstractResolvedFeature
computeContextTypeParameterMapping, getContextType, getContextTypeParameterMapping, getDeclaration, getResolvedDeclarator, getResolvedReference, getResolvedReferences, getSubstitutor, isResolvedTypeParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.override.IResolvedExecutable
getResolvedExceptions, getResolvedParameterTypes, getTypeParameters
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.override.IResolvedFeature
getContextType, getResolvedDeclarator, getResolvedErasureSignature, getResolvedSignature, getSimpleSignature
-
Methods inherited from interface org.eclipse.xtext.xbase.typesystem.override.IResolvedOperation
getDeclaration
-
-
-
-
Constructor Detail
-
BottomResolvedOperation
public BottomResolvedOperation(org.eclipse.xtext.common.types.JvmOperation declaration, LightweightTypeReference contextType, OverrideTester overrideTester)
-
-
Method Detail
-
isBottomInContext
public boolean isBottomInContext()
Description copied from interface:IResolvedOperationReturnstrueif 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 methodI1#morI2#mboth will returntrue.- See Also:
IResolvedOperation.getAsBottom()
-
getAsBottom
public IResolvedOperation getAsBottom()
Description copied from interface:IResolvedOperationReturns the current method as abottom method. That implies, that thecontext typeof the result is the resolved declarator of the currentdeclaration.interface I<T> { <K> T m(K k); } class C implements I<V< { <U> V m(U u); }If this resolved method representsI#min the context of classC(thus the return type will beVand theresolved type parametersincludeU,IResolvedOperation.getAsBottom()will yieldI#min the context ofI<V<. That is, the return type is still resolved toV. Nevertheless, the local type parameter ofI#mis now resolved to its declarationK. This implies that the parameter type is no longer resolved toUbutKinstead. 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.- Returns:
- the current operation as bottom type.
- See Also:
IResolvedOperation.isBottomInContext()
-
getBottom
protected BottomResolvedOperation getBottom()
- Specified by:
getBottomin classAbstractResolvedOperation
-
getOverrideTester
protected OverrideTester getOverrideTester()
- Overrides:
getOverrideTesterin classAbstractResolvedOperation
-
getOverrideCheckResult
public IOverrideCheckResult getOverrideCheckResult()
Description copied from interface:IResolvedOperationThe override check result that is associated with this operation. If this is abottom, thedetailswill only include thecurrentdetail. In other cases, the actual information about the relationship of the hierarchy function to its specialization in thecontextis returned.- Returns:
- the computed check result
-
-