Record Class ResourceCloser.FirstFailure
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.ResourceCloser.FirstFailure
- Record Components:
variable- the IR slot that holds the first EK9 ExceptionownerScopeId- the scope that is current where the region is made, which owns the slot
- Enclosing class:
ResourceCloser
public static record ResourceCloser.FirstFailure(String variable, String ownerScopeId)
extends Record
The region's first-failure variable, declared (null) BEFORE the region by
ResourceCloser.declareFirstFailure(ResourceCloser.FirstFailure, DebugInfo) - it must be definitely assigned where the region's handlers start. A slot the
region's owner scope owns: filled once, by whichever handler records the first failure, and its value dropped
when that scope exits (the rethrow takes a count of its own).-
Constructor Summary
ConstructorsConstructorDescriptionFirstFailure(String variable, String ownerScopeId) Creates an instance of aFirstFailurerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theownerScopeIdrecord component.final StringtoString()Returns a string representation of this record class.variable()Returns the value of thevariablerecord component.
-
Constructor Details
-
FirstFailure
Creates an instance of aFirstFailurerecord class.- Parameters:
variable- the value for thevariablerecord componentownerScopeId- the value for theownerScopeIdrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
variable
-
ownerScopeId
Returns the value of theownerScopeIdrecord component.- Returns:
- the value of the
ownerScopeIdrecord component
-