Class CheckedExceptionsUtil

java.lang.Object
org.checkerframework.framework.util.typeinference8.util.CheckedExceptionsUtil

public final class CheckedExceptionsUtil extends Object
Util for checked exception constraints.
  • Method Details

    • thrownCheckedExceptions

      public static List<CheckedExceptionsUtil.ThrownCheckedException> thrownCheckedExceptions(LambdaExpressionTree lambda, Java8InferenceContext context)
      Returns the checked exception types that can be thrown by the lambda.
      Parameters:
      lambda - an expression
      context - inference context
      Returns:
      the checked exception types that can be thrown by the lambda
    • isCheckedException

      public static boolean isCheckedException(TypeMirror type, Java8InferenceContext context)
      Returns true iff type is a checked exception.
      Parameters:
      type - an exception type to check (that is, Throwable or a subtype of it)
      context - the context
      Returns:
      true iff type is a checked exception