Class DerivedDataBuilderChain<B,R>

java.lang.Object
com._1c.g5.v8.derived.context.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 Summary

    Constructors
    Constructor
    Description
    Creates an instance of the chain bound to the specific default EMF package.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract R
    Collects the result of a particular builder.
    Compiles all collectors defined by builders belonging to this chain.
    protected abstract B
    createSpecificBuilder(org.eclipse.emf.ecore.EClass eClass)
    Creates specific builder instance for the given class.
    newRule(org.eclipse.emf.ecore.EClass eClass)
    Creates new builder and sets it as current builder.
    Gets the current builder (rule) from the chain.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DerivedDataBuilderChain

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

    • 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.