Class CheckedExceptionsUtil
java.lang.Object
org.checkerframework.framework.util.typeinference8.util.CheckedExceptionsUtil
Util for checked exception constraints.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA checked exception that a functional expression can throw, viewed both as aTypeMirrorand as anAnnotatedTypeMirror. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCheckedException(TypeMirror type, Java8InferenceContext context) Returns true ifftypeis a checked exception.thrownCheckedExceptions(LambdaExpressionTree lambda, Java8InferenceContext context) Returns the checked exception types that can be thrown by the lambda.
-
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 expressioncontext- inference context- Returns:
- the checked exception types that can be thrown by the lambda
-
isCheckedException
Returns true ifftypeis a checked exception.- Parameters:
type- an exception type to check (that is, Throwable or a subtype of it)context- the context- Returns:
- true iff
typeis a checked exception
-