Class ExceptionHandler
java.lang.Object
com.oracle.truffle.api.bytecode.ExceptionHandler
Introspection class modeling the meta-information of an exception handler in a bytecode
interpreter. An exception handler stores information for bytecode index ranges that determine how
an exception should be handled at a particular location.
Note: Introspection classes are intended to be used for debugging purposes only. These APIs may change in the future.
- Since:
- 24.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents the kind of the exception handler. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ExceptionHandler
(Object token) Internal constructor for generated code. -
Method Summary
Modifier and TypeMethodDescriptionabstract int
Returns the end bytecode index guarded by this exception handler (exclusive).int
Returns the bytecode index of the handler code if this exception handler is of kindExceptionHandler.HandlerKind.CUSTOM
.abstract ExceptionHandler.HandlerKind
getKind()
Returns a kind that determines whether the handler is a custom or special exception handler.abstract int
Returns the start bytecode index guarded by this exception handler (inclusive).Returns the tag tree of this exception handler if this exception handler is of kindExceptionHandler.HandlerKind.TAG
.final String
toString()
-
Constructor Details
-
ExceptionHandler
Internal constructor for generated code. Do not use.- Since:
- 24.2
-
-
Method Details
-
getKind
Returns a kind that determines whether the handler is a custom or special exception handler.- Since:
- 24.2
- See Also:
-
getStartBytecodeIndex
public abstract int getStartBytecodeIndex()Returns the start bytecode index guarded by this exception handler (inclusive).- Since:
- 24.2
-
getEndBytecodeIndex
public abstract int getEndBytecodeIndex()Returns the end bytecode index guarded by this exception handler (exclusive).- Since:
- 24.2
-
getHandlerBytecodeIndex
Returns the bytecode index of the handler code if this exception handler is of kindExceptionHandler.HandlerKind.CUSTOM
.- Throws:
UnsupportedOperationException
- for handlers not of kindExceptionHandler.HandlerKind.CUSTOM
- Since:
- 24.2
-
getTagTree
Returns the tag tree of this exception handler if this exception handler is of kindExceptionHandler.HandlerKind.TAG
.- Throws:
UnsupportedOperationException
- for handlers not of kindExceptionHandler.HandlerKind.TAG
- Since:
- 24.2
-
toString
-