Class BiggestSubTreeDispatcher
- java.lang.Object
-
- org.tensorics.core.resolve.engine.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:
- Check from top to bottom and find all nodes of the tree for which external implementations exist.
- Execute all these nodes.
-
-
Constructor Summary
Constructors Constructor Description BiggestSubTreeDispatcher(ResolverRepository resolverRepository)
Constructor, which requires an Implementation module on which this processor will act on.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvingContext
processTree(Node rootNode, ResolvingContext oldContext, OptionRegistry<ResolvingOption> processingOptions)
process the tree, starting from the given node and resolve as many nodes as possible.
-
-
-
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 interfaceDispatcher
- Parameters:
rootNode
- the node which shall be considered as root node of the tree to processoldContext
- 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.
-
-