Class GuiEffectVisitor.GuiEffectOverrideChecker

java.lang.Object
BaseTypeVisitor<GuiEffectTypeFactory>.OverrideChecker
org.checkerframework.checker.guieffect.GuiEffectVisitor.GuiEffectOverrideChecker
Enclosing class:
GuiEffectVisitor

protected class GuiEffectVisitor.GuiEffectOverrideChecker extends BaseTypeVisitor<GuiEffectTypeFactory>.OverrideChecker
  • Constructor Details

    • 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 reference
      overrider - the type of the overriding method
      overridingType - the type enclosing the overrider method, usually an AnnotatedDeclaredType; for Method References may be something else
      overridingReturnType - the return type of the overriding method
      overridden - the type of the overridden method
      overriddenType - the declared type enclosing the overridden method
      overriddenReturnType - 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 class BaseTypeVisitor<GuiEffectTypeFactory>.OverrideChecker
      Returns:
      true if the override is legal