Class ResolverTools


  • public class ResolverTools
    extends java.lang.Object
    A set of tools for dealing with factorys, specifically to make chaining issues easy to deal with.
    • Constructor Detail

      • ResolverTools

        public ResolverTools()
    • Method Detail

      • appendFactory

        public static <T extends VariableResolverFactory> T appendFactory​(VariableResolverFactory root,
                                                                          T newFactory)
        Based on a root factory, append the new factory to the end of the chain.
        Type Parameters:
        T - type
        Parameters:
        root - The root factory
        newFactory - The new factory
        Returns:
        An instance of the new factory
      • insertFactory

        public static <T extends VariableResolverFactory> T insertFactory​(VariableResolverFactory root,
                                                                          T newFactory)
        Based on the root factory, insert the new factory right after the root, and before any other in the chain.
        Type Parameters:
        T - type
        Parameters:
        root - The root factory
        newFactory - The new factory
        Returns:
        An instance of the new factory.