Package com.google.errorprone.util
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 Reachability()
-
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.
-
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.
-