Class QualifiedElementFactory

java.lang.Object
de.iip_ecosphere.platform.transport.serialization.QualifiedElementFactory

public class QualifiedElementFactory extends Object
Creates instances of QualifiedElement, intended to be configured by transport mechanisms.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • QualifiedElementFactory

      public QualifiedElementFactory()
  • Method Details

    • reset

      public static void reset()
      Resets the creators registered with this factory.
    • getSupplier

      public static <T> Supplier<QualifiedElement<T>> getSupplier(Class<T> cls)
      Creates an element instance for a given value type.
      Type Parameters:
      T - the value type
      Parameters:
      cls - the value type class
      Returns:
      the element instance
    • createElement

      public static <T> QualifiedElement<T> createElement(Class<T> cls)
      Creates an element instance for a given value type.
      Type Parameters:
      T - the value type
      Parameters:
      cls - the value type class
      Returns:
      the element instance
    • registerElementSupplier

      public static <T> void registerElementSupplier(Class<T> cls, Supplier<QualifiedElement<T>> supplier)
      Registers an element supplier. Nothing happens if cls or supplier are null.
      Type Parameters:
      T - the element value type
      Parameters:
      cls - the element value type class
      supplier - the corresponding supplier