Class TreeRenderers


  • public final class TreeRenderers
    extends Object
    Entry point to fetch and register tree renderers. This API is meant to be integrated in tools that operate on tree descriptors generically. For that reason the standard descriptors provided by PMD and their properties are not public.
    See Also:
    findById(String), register(TreeRendererDescriptor)
    • Method Detail

      • findById

        public static TreeRendererDescriptor findById​(String id)
        Returns the renderer descriptor registered by the given ID. Returns null if not found, or the id is null.
        Parameters:
        id - ID of the renderer to find
        Returns:
        The descriptor, or null
      • registeredRenderers

        public static Collection<TreeRendererDescriptor> registeredRenderers()
        Returns the set of renderers currently registered. Order is undefined.
      • register

        public static boolean register​(TreeRendererDescriptor descriptor)
        Registers the given renderer. If registration succeeds (the ID is not already associated to a descriptor), the descriptor will be available with findById(String).
        Parameters:
        descriptor - Descriptor to register
        Returns:
        True if the registration succeeded, false if there was already a registered renderer with the given ID.