Class DerivedDataBuilderChain<B,​R>

  • Type Parameters:
    B - Type of the builder supported by this chain.
    R - Type of the combined result produced by this builder chain. Typically it's a type being returned by the builder.
    Direct Known Subclasses:
    PartBasedContextCollectorBuilderChain

    public abstract class DerivedDataBuilderChain<B,​R>
    extends Object
    Chained builder of combining different builders related to a single business slice (contributor).
    • Constructor Detail

      • DerivedDataBuilderChain

        public DerivedDataBuilderChain()
        Creates an instance of the chain bound to the specific default EMF package.
    • Method Detail

      • compile

        public List<R> compile()
        Compiles all collectors defined by builders belonging to this chain.
        Returns:
        The list of scope collectors defined in this chain.
      • newRule

        public B newRule​(org.eclipse.emf.ecore.EClass eClass)
        Creates new builder and sets it as current builder.
        Parameters:
        eClass - Target class for the builder (and resulting rule)
        Returns:
        The instance of the builder bound to the given type.
      • rule

        public B rule()
        Gets the current builder (rule) from the chain.
        Returns:
        The current instance of the builder.
      • collectBuilderResult

        protected abstract R collectBuilderResult​(B builder)
        Collects the result of a particular builder.
        Parameters:
        builder - The builder to collect result for.
        Returns:
        The result of the builder work.
      • createSpecificBuilder

        protected abstract B createSpecificBuilder​(org.eclipse.emf.ecore.EClass eClass)
        Creates specific builder instance for the given class.
        Parameters:
        eClass - The context class for the builder being created.
        Returns:
        New instance of the builder.