Interface NodeFactory<T>

All Known Implementing Classes:
NodeFactoryBase

public interface NodeFactory<T>
Enables the dynamic creation of generated nodes. It provides an convenient way to instantiate generated node classes without using reflection.
  • 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
    • 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.
    • getNodeSignatures

      List<List<Class<?>>> getNodeSignatures()
      Returns a list of signatures that can be used to invoke createNode(Object...).
    • 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.