Class Heuristics.WithinTrueBranch

All Implemented Interfaces:
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.
  • Constructor Details

    • WithinTrueBranch

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

    • match

      public boolean match(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