Class GuiEffectVisitor.GuiEffectOverrideChecker
java.lang.Object
BaseTypeVisitor<GuiEffectTypeFactory>.org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
org.checkerframework.checker.guieffect.GuiEffectVisitor.GuiEffectOverrideChecker
- Enclosing class:
GuiEffectVisitor
protected class GuiEffectVisitor.GuiEffectOverrideChecker
extends BaseTypeVisitor<GuiEffectTypeFactory>.OverrideChecker
-
Field Summary
Fields inherited from class org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
isMethodReference, overridden, overriddenReturnType, overriddenType, overrider, overriderReturnType, overriderTree, overriderType
-
Constructor Summary
ConstructorDescriptionGuiEffectOverrideChecker
(Tree overriderTree, AnnotatedTypeMirror.AnnotatedExecutableType overrider, AnnotatedTypeMirror overridingType, AnnotatedTypeMirror overridingReturnType, AnnotatedTypeMirror.AnnotatedExecutableType overridden, AnnotatedTypeMirror.AnnotatedDeclaredType overriddenType, AnnotatedTypeMirror overriddenReturnType) Create a GuiEffectOverrideChecker. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Extend the receiver part of the method override check.Methods inherited from class org.checkerframework.common.basetype.BaseTypeVisitor.OverrideChecker
checkMemberReferenceReceivers, checkOverride
-
Constructor Details
-
GuiEffectOverrideChecker
public GuiEffectOverrideChecker(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 Details
-
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<GuiEffectTypeFactory>.OverrideChecker
- Returns:
- true if the override is legal
-