Record Class CheckedExceptionsUtil.ThrownCheckedException
java.lang.Object
java.lang.Record
org.checkerframework.framework.util.typeinference8.util.CheckedExceptionsUtil.ThrownCheckedException
- Record Components:
javaType- the exception typeannotatedType- the exception type, with annotations
- Enclosing class:
CheckedExceptionsUtil
public static record CheckedExceptionsUtil.ThrownCheckedException(TypeMirror javaType, AnnotatedTypeMirror annotatedType)
extends Record
A checked exception that a functional expression can throw, viewed both as a
TypeMirror
and as an AnnotatedTypeMirror. For a lambda, these are the checked exceptions that the
lambda body can throw; for a method reference, they are the checked exceptions in the throws
clause of the compile-time declaration.
For an exception thrown by a method invocation, javaType is the exception type as
declared by the invoked method, whereas annotatedType is the exception type of the
invocation, in which the method's type variables have been substituted.
-
Constructor Summary
ConstructorsConstructorDescriptionThrownCheckedException(TypeMirror javaType, AnnotatedTypeMirror annotatedType) Creates an instance of aThrownCheckedExceptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotatedTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.javaType()Returns the value of thejavaTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ThrownCheckedException
Creates an instance of aThrownCheckedExceptionrecord class.- Parameters:
javaType- the value for thejavaTyperecord componentannotatedType- the value for theannotatedTyperecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
javaType
Returns the value of thejavaTyperecord component.- Returns:
- the value of the
javaTyperecord component
-
annotatedType
Returns the value of theannotatedTyperecord component.- Returns:
- the value of the
annotatedTyperecord component
-