Package org.graalvm.polyglot.management
Class ExecutionEvent
java.lang.Object
org.graalvm.polyglot.management.ExecutionEvent
An execution event object passed to an execution listener consumer. Execution event instances
remain valid until the engine is closed. Values and returned exceptions will only remain valid
until the context was closed.
- Since:
- 19.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the exception of this source location after it was executed.Returns the input values provided to execute this source location.Returns the source location of the event that was triggered ornull
if no location source location is available.Returns the return value of this source location after it was executed.Returns the root name ornull
if no name is available.boolean
Returnstrue
if the source location is marked as expression, elsefalse
.boolean
isRoot()
Returnstrue
if the source location is marked as a root of a function, method or closure, elsefalse
.boolean
Returnstrue
if the source location is marked as a statement, elsefalse
.toString()
-
Method Details
-
getLocation
Returns the source location of the event that was triggered ornull
if no location source location is available.- Since:
- 19.0
-
getRootName
Returns the root name ornull
if no name is available. The root name may also be available for events caused by expressions and statements. In this case the name of the containing root will be returned.- Since:
- 19.0
-
getInputValues
Returns the input values provided to execute this source location. This method returnsnull
if input value collection is notenabled
. Input values are available inOnReturn
events.The returned list may containnull
values if input values were not evaluated or if an exception occurred executing input values. The returned list is unmodifiable. The returned input values may escape the event consumer and remain valid until the context is closed.- Since:
- 19.0
-
getReturnValue
Returns the return value of this source location after it was executed. This method returnsnull
if return value collection is notenabled
. Return values are available inOnReturn
events. The returned value is allowed to escape the event consumer and remain valid until the context is closed.- Since:
- 19.0
-
getException
Returns the exception of this source location after it was executed. This method returnsnull
if exception collection is notenabled
. Exceptions are only available inOnReturn
events if an exception was thrown when the location was executed. The returned value is allowed to escape the event consumer and remains valid until the context is closed.- Since:
- 19.0
-
isExpression
public boolean isExpression()Returnstrue
if the source location is marked as expression, elsefalse
. The collection of expression events may be enabled by callingExecutionListener.Builder.expressions(boolean)
.- Since:
- 19.0
-
isStatement
public boolean isStatement()Returnstrue
if the source location is marked as a statement, elsefalse
. The collection of statement events may be enabled by callingExecutionListener.Builder.statements(boolean)
.- Since:
- 19.0
-
isRoot
public boolean isRoot()Returnstrue
if the source location is marked as a root of a function, method or closure, elsefalse
. The collection of root events may be enabled by callingExecutionListener.Builder.roots(boolean)
.- Since:
- 19.0
-
toString
-