Record Class TryBlockDetails
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.TryBlockDetails
public record TryBlockDetails(String tryScopeId, List<IRInstr> tryBodyEvaluation, String tryBodyResult)
extends Record
Record representing the try block within a TRY_CATCH_FINALLY control flow chain.
Contains the try block scope and body evaluation instructions. Resources (if any) are managed through the guard variable mechanism in ControlFlowChainDetails.
The try block represents the primary execution path that may throw exceptions. If an exception is thrown, control transfers to the appropriate catch handler (if any), followed by the finally block (if present).
-
Constructor Summary
ConstructorsConstructorDescriptionTryBlockDetails(String tryScopeId, List<IRInstr> tryBodyEvaluation, String tryBodyResult) Creates an instance of aTryBlockDetailsrecord 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.toString()IR-optimized toString following EK9's bracket-only, no-indentation format.Returns the value of thetryBodyEvaluationrecord component.Returns the value of thetryBodyResultrecord component.Returns the value of thetryScopeIdrecord component.
-
Constructor Details
-
TryBlockDetails
Creates an instance of aTryBlockDetailsrecord class.- Parameters:
tryScopeId- the value for thetryScopeIdrecord componenttryBodyEvaluation- the value for thetryBodyEvaluationrecord componenttryBodyResult- the value for thetryBodyResultrecord 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). -
tryScopeId
Returns the value of thetryScopeIdrecord component.- Returns:
- the value of the
tryScopeIdrecord component
-
tryBodyEvaluation
-
tryBodyResult
Returns the value of thetryBodyResultrecord component.- Returns:
- the value of the
tryBodyResultrecord component
-