Interface NodeFactory<T>


public interface NodeFactory<T>
Enables the dynamic creation of generated nodes. It provides an convenient way to instantiate generated node classes without using reflection.
Since:
0.8 or earlier
  • Method Details

    • createNode

      T createNode(Object... arguments)
      Instantiates the node using the arguments array. The arguments length and types must suffice one of the returned signatures in getNodeSignatures(). If the arguments array does not suffice one of the node signatures an IllegalArgumentException is thrown.
      Parameters:
      arguments - the argument values
      Returns:
      the instantiated node
      Throws:
      IllegalArgumentException
      Since:
      0.8 or earlier
    • getNodeClass

      Class<T> getNodeClass()
      Returns the node class that will get created by createNode(Object...). The node class does not match exactly to the instantiated object but they are guaranteed to be assignable.
      Since:
      0.8 or earlier
    • getNodeSignatures

      List<List<Class<?>>> getNodeSignatures()
      Returns a list of signatures that can be used to invoke createNode(Object...).
      Since:
      0.8 or earlier
    • getExecutionSignature

      List<Class<? extends Node>> getExecutionSignature()
      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.
      Since:
      0.8 or earlier
    • getUncachedInstance

      default T getUncachedInstance()
      Returns the uncached version of this node or null if GenerateUncached was not applied to the node.
      Since:
      19.1.0