Class RendererRegistry

java.lang.Object
com.arbergashi.charts.render.RendererRegistry

public final class RendererRegistry extends Object
Public facade for the renderer registry.

Framework policy: There is exactly one registry of renderer factories. The single source of truth is RendererRegistry. This class exists as the stable public entry point for framework consumers.

Since:
2025-06-17
Version:
1.0.0
Author:
Arber Gashi
  • Method Details

    • register

      public static void register(String id, RendererDescriptor descriptor, Supplier<? extends ChartRenderer> factory)
      Registers a renderer factory.
    • create

      public static ChartRenderer create(String id)
      Backwards-compatible creation method. May return null if the renderer id is not registered.
    • createOptional

      public static Optional<ChartRenderer> createOptional(String id)
      Preferred creation method.
    • require

      public static ChartRenderer require(String id)
      Strict creation method.
    • descriptors

      public static Map<String, ? extends RendererDescriptor> descriptors()
      Returns immutable renderer descriptors.
    • metadata

      public static Map<String, RendererMetadata> metadata()
      Returns renderer metadata as stable public API objects.

      This avoids leaking com.arbergashi.charts.internal.* types into consuming applications while keeping the internal registry as the single source of truth.