Class Reachability

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    canCompleteNormally(com.sun.source.tree.CaseTree caseTree)
    Returns true if the given case tree can complete normally, as defined by JLS 14.21.
    static boolean
    canCompleteNormally(com.sun.source.tree.StatementTree statement)
    Returns true if the given statement can complete normally, as defined by JLS 14.21.

    Methods inherited from class java.lang.Object

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

    • Reachability

      public Reachability()
  • Method Details

    • canCompleteNormally

      public static boolean canCompleteNormally(com.sun.source.tree.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(com.sun.source.tree.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.