Class NodeFactoryBase<T>
java.lang.Object
com.oracle.truffle.api.dsl.internal.NodeFactoryBase<T>
- All Implemented Interfaces:
NodeFactory<T>
This is NOT public API. Do not use directly. This code may change without notice.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeFactoryBase
(Class<T> nodeClass, Class<?>[] executionSignatures, Class<?>[][] nodeSignatures) -
Method Summary
Modifier and TypeMethodDescriptionabstract T
createNode
(Object... arguments) Instantiates the node using the arguments array.Returns a list of children that will be executed by the created node.Returns the node class that will get created byNodeFactory.createNode(Object...)
.Returns a list of signatures that can be used to invokeNodeFactory.createNode(Object...)
.
-
Constructor Details
-
NodeFactoryBase
-
-
Method Details
-
createNode
Description copied from interface:NodeFactory
Instantiates the node using the arguments array. The arguments length and types must suffice one of the returned signatures inNodeFactory.getNodeSignatures()
. If the arguments array does not suffice one of the node signatures anIllegalArgumentException
is thrown.- Specified by:
createNode
in interfaceNodeFactory<T>
- Parameters:
arguments
- the argument values- Returns:
- the instantiated node
-
getNodeClass
Description copied from interface:NodeFactory
Returns the node class that will get created byNodeFactory.createNode(Object...)
. The node class does not match exactly to the instantiated object but they are guaranteed to be assignable.- Specified by:
getNodeClass
in interfaceNodeFactory<T>
-
getNodeSignatures
Description copied from interface:NodeFactory
Returns a list of signatures that can be used to invokeNodeFactory.createNode(Object...)
.- Specified by:
getNodeSignatures
in interfaceNodeFactory<T>
-
getExecutionSignature
Description copied from interface:NodeFactory
Returns a list of children that will be executed by the created node. This is useful for base nodes that can execute a variable amount of nodes.- Specified by:
getExecutionSignature
in interfaceNodeFactory<T>
-