Class BiggestSubTreeDispatcher

  • All Implemented Interfaces:
    Dispatcher

    public class BiggestSubTreeDispatcher
    extends java.lang.Object
    implements Dispatcher
    Processes a tree of instruction nodes and tries to resolve the biggest possible subtrees internally in the module.

    The steps of the current algorithm are the following:

    1. Check from top to bottom and find all nodes of the tree for which external implementations exist.
    2. Execute all these nodes.
    • Constructor Detail

      • BiggestSubTreeDispatcher

        public BiggestSubTreeDispatcher​(ResolverRepository resolverRepository)
        Constructor, which requires an Implementation module on which this processor will act on.
        Parameters:
        resolverRepository - the repository that shall contain all available resolvers.
    • Method Detail

      • processTree

        public ResolvingContext processTree​(Node rootNode,
                                            ResolvingContext oldContext,
                                            OptionRegistry<ResolvingOption> processingOptions)
        Description copied from interface: Dispatcher
        process the tree, starting from the given node and resolve as many nodes as possible.
        Specified by:
        processTree in interface Dispatcher
        Parameters:
        rootNode - the node which shall be considered as root node of the tree to process
        oldContext - the current state of the context, which can be used by resolvers to look up some values.
        Returns:
        a context which shall contain the resolved values.