Class GuiEffectVisitor.GuiEffectOverrideChecker
- java.lang.Object
-
- org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
-
- org.checkerframework.checker.guieffect.GuiEffectVisitor.GuiEffectOverrideChecker
-
- Enclosing class:
- GuiEffectVisitor
protected class GuiEffectVisitor.GuiEffectOverrideChecker extends BaseTypeVisitor.OverrideChecker
-
-
Field Summary
-
Fields inherited from class org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
isMethodReference, overridden, overriddenReturnType, overriddenType, overrider, overriderReturnType, overriderTree, overriderType
-
-
Constructor Summary
Constructors Constructor Description GuiEffectOverrideChecker(com.sun.source.tree.Tree overriderTree, AnnotatedTypeMirror.AnnotatedExecutableType overrider, AnnotatedTypeMirror overridingType, AnnotatedTypeMirror overridingReturnType, AnnotatedTypeMirror.AnnotatedExecutableType overridden, AnnotatedTypeMirror.AnnotatedDeclaredType overriddenType, AnnotatedTypeMirror overriddenReturnType)
Create a GuiEffectOverrideChecker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkReceiverOverride()
Extend the receiver part of the method override check.-
Methods inherited from class org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
checkMemberReferenceReceivers, checkOverride
-
-
-
-
Constructor Detail
-
GuiEffectOverrideChecker
public GuiEffectOverrideChecker(com.sun.source.tree.Tree overriderTree, AnnotatedTypeMirror.AnnotatedExecutableType overrider, AnnotatedTypeMirror overridingType, AnnotatedTypeMirror overridingReturnType, AnnotatedTypeMirror.AnnotatedExecutableType overridden, AnnotatedTypeMirror.AnnotatedDeclaredType overriddenType, AnnotatedTypeMirror overriddenReturnType)
Create a GuiEffectOverrideChecker.- Parameters:
overriderTree
- the AST node of the overriding method or method referenceoverrider
- the type of the overriding methodoverridingType
- the type enclosing the overrider method, usually an AnnotatedDeclaredType; for Method References may be something elseoverridingReturnType
- the return type of the overriding methodoverridden
- the type of the overridden methodoverriddenType
- the declared type enclosing the overridden methodoverriddenReturnType
- the return type of the overridden method
-
-
Method Detail
-
checkReceiverOverride
protected boolean checkReceiverOverride()
Extend the receiver part of the method override check. We extend the standard check, to additionally permit narrowing the receiver's permission to@AlwaysSafe
in a safe instantiation of a@PolyUIType
. Returns true if the override is permitted.- Overrides:
checkReceiverOverride
in classBaseTypeVisitor.OverrideChecker
- Returns:
- true if the override is legal
-
-