Class TreeRenderers
java.lang.Object
net.sourceforge.pmd.util.treeexport.TreeRenderers
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:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TreeRendererDescriptorReturns the renderer descriptor registered by the given ID.static booleanregister(TreeRendererDescriptor descriptor) Registers the given renderer.static Collection<TreeRendererDescriptor> Returns the set of renderers currently registered.
-
Method Details
-
findById
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
Returns the set of renderers currently registered. Order is undefined. -
register
Registers the given renderer. If registration succeeds (the ID is not already associated to a descriptor), the descriptor will be available withfindById(String).- Parameters:
descriptor- Descriptor to register- Returns:
- True if the registration succeeded, false if there was already a registered renderer with the given ID.
-