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 ornullif no location source location is available.Returns the return value of this source location after it was executed.Returns the root name ornullif no name is available.booleanReturnstrueif the source location is marked as expression, elsefalse.booleanisRoot()Returnstrueif the source location is marked as a root of a function, method or closure, elsefalse.booleanReturnstrueif the source location is marked as a statement, elsefalse.toString()
-
Method Details
-
getLocation
Returns the source location of the event that was triggered ornullif no location source location is available.- Since:
- 19.0
-
getRootName
Returns the root name ornullif 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 returnsnullif input value collection is notenabled. Input values are available inOnReturnevents.The returned list may containnullvalues 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 returnsnullif return value collection is notenabled. Return values are available inOnReturnevents. 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 returnsnullif exception collection is notenabled. Exceptions are only available inOnReturnevents 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()Returnstrueif 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()Returnstrueif 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()Returnstrueif 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
-