Interface BlockNode.ElementExecutor<T extends Node>
public static interface BlockNode.ElementExecutor<T extends Node>
Represents a contract how block element nodes can be executed. Designed for the block node
only.
- Since:
- 19.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanexecuteBoolean(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a boolean value.default byteexecuteByte(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a byte value.default charexecuteChar(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a char value.default doubleexecuteDouble(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a double value.default floatexecuteFloat(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a float value.default ObjectexecuteGeneric(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a generic value.default intexecuteInt(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects an int value.default longexecuteLong(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a long value.default shortexecuteShort(VirtualFrame frame, T node, int index, int argument) Executes the block node element and expects a short value.voidexecuteVoid(VirtualFrame frame, T node, int index, int argument) Executes the block node element without expecting any return value.
-
Method Details
-
executeVoid
Executes the block node element without expecting any return value.- Since:
- 19.3
-
executeGeneric
Executes the block node element and expects a generic value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteVoid(VirtualFrame, Node, int, int)by default.- Since:
- 19.3
-
executeBoolean
default boolean executeBoolean(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a boolean value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a boolean.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeByte
default byte executeByte(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a byte value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a byte.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeShort
default short executeShort(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a short value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a short.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeChar
default char executeChar(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a char value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a char.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeInt
default int executeInt(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects an int value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not an int.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeLong
default long executeLong(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a long value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a long.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeFloat
default float executeFloat(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a float value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a float.- Throws:
UnexpectedResultException- Since:
- 19.3
-
executeDouble
default double executeDouble(VirtualFrame frame, T node, int index, int argument) throws UnexpectedResultException Executes the block node element and expects a double value. This method is used for the last element of the block, to provide a value to the block execute method. Forwards toexecuteGeneric(VirtualFrame, Node, int, int)by default and throws anUnexpectedResultExceptionif the value is not a double.- Throws:
UnexpectedResultException- Since:
- 19.3
-