Class Heuristics.WithinTrueBranch

java.lang.Object
com.sun.source.util.SimpleTreeVisitor<Boolean,Void>
org.checkerframework.framework.util.Heuristics.Matcher
org.checkerframework.framework.util.Heuristics.WithinTrueBranch
All Implemented Interfaces:
com.sun.source.tree.TreeVisitor<Boolean,Void>
Enclosing class:
Heuristics

public static class Heuristics.WithinTrueBranch extends Heuristics.Matcher
match() returns true if called on a path whose leaf is within the "then" clause of an if whose conditon matches the matcher (supplied at object initialization). Also returns true if the leaf is within the "else" of a negated condition that matches the supplied matcher.
  • Field Summary

    Fields inherited from class com.sun.source.util.SimpleTreeVisitor

    DEFAULT_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    match(com.sun.source.util.TreePath path)
    Returns true if the given path matches this Matcher.

    Methods inherited from class org.checkerframework.framework.util.Heuristics.Matcher

    defaultAction, visitParenthesized

    Methods inherited from class com.sun.source.util.SimpleTreeVisitor

    visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBinary, visitBindingPattern, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitCompoundAssignment, visitConditionalExpression, visitContinue, visitDefaultCaseLabel, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExports, visitExpressionStatement, visitForLoop, visitGuardedPattern, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitMethod, visitMethodInvocation, visitModifiers, visitModule, visitNewArray, visitNewClass, visitOpens, visitOther, visitPackage, visitParameterizedType, visitParenthesizedPattern, visitPrimitiveType, visitProvides, visitRequires, visitReturn, visitSwitch, visitSwitchExpression, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnary, visitUnionType, visitUses, visitVariable, visitWhileLoop, visitWildcard, visitYield

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WithinTrueBranch

      public WithinTrueBranch(Heuristics.Matcher conditionMatcher)
      Parameters:
      conditionMatcher - for the condition
  • Method Details

    • match

      public boolean match(com.sun.source.util.TreePath path)
      Description copied from class: Heuristics.Matcher
      Returns true if the given path matches this Matcher.
      Overrides:
      match in class Heuristics.Matcher
      Parameters:
      path - the path to test
      Returns:
      true if the given path matches this Matcher