Class NodeFactoryBase<T>
- java.lang.Object
-
- com.oracle.truffle.api.dsl.internal.NodeFactoryBase<T>
-
- All Implemented Interfaces:
NodeFactory<T>
public abstract class NodeFactoryBase<T> extends java.lang.Object implements NodeFactory<T>
This is NOT public API. Do not use directly. This code may change without notice.
-
-
Constructor Summary
Constructors Constructor Description NodeFactoryBase(java.lang.Class<T> nodeClass, java.lang.Class<?>[] executionSignatures, java.lang.Class<?>[][] nodeSignatures)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract TcreateNode(java.lang.Object... arguments)Instantiates the node using the arguments array.java.util.List<java.lang.Class<? extends Node>>getExecutionSignature()Returns a list of children that will be executed by the created node.java.lang.Class<T>getNodeClass()Returns the node class that will get created byNodeFactory.createNode(Object...).java.util.List<java.util.List<java.lang.Class<?>>>getNodeSignatures()Returns a list of signatures that can be used to invokeNodeFactory.createNode(Object...).
-
-
-
Constructor Detail
-
NodeFactoryBase
public NodeFactoryBase(java.lang.Class<T> nodeClass, java.lang.Class<?>[] executionSignatures, java.lang.Class<?>[][] nodeSignatures)
-
-
Method Detail
-
createNode
public abstract T createNode(java.lang.Object... arguments)
Description copied from interface:NodeFactoryInstantiates 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 anIllegalArgumentExceptionis thrown.- Specified by:
createNodein interfaceNodeFactory<T>- Parameters:
arguments- the argument values- Returns:
- the instantiated node
-
getNodeClass
public final java.lang.Class<T> getNodeClass()
Description copied from interface:NodeFactoryReturns 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:
getNodeClassin interfaceNodeFactory<T>
-
getNodeSignatures
public final java.util.List<java.util.List<java.lang.Class<?>>> getNodeSignatures()
Description copied from interface:NodeFactoryReturns a list of signatures that can be used to invokeNodeFactory.createNode(Object...).- Specified by:
getNodeSignaturesin interfaceNodeFactory<T>
-
getExecutionSignature
public final java.util.List<java.lang.Class<? extends Node>> getExecutionSignature()
Description copied from interface:NodeFactoryReturns 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:
getExecutionSignaturein interfaceNodeFactory<T>
-
-