Class Reachability

java.lang.Object
com.google.errorprone.util.Reachability

public class Reachability
extends Object
An implementation of JLS 14.21 reachability.
  • Constructor Details

    • Reachability

      public Reachability()
  • Method Details

    • canCompleteNormally

      public static boolean canCompleteNormally​(StatementTree statement)
      Returns true if the given statement can complete normally, as defined by JLS 14.21.

      An exception is made for System.exit, which cannot complete normally in practice.

    • canCompleteNormally

      public static boolean canCompleteNormally​(CaseTree caseTree)
      Returns true if the given case tree can complete normally, as defined by JLS 14.21.

      An exception is made for System.exit, which cannot complete normally in practice.