Interface ComponentRenderer<C>
- Type Parameters:
C
- the context type
- All Known Implementing Classes:
AbstractComponentRenderer
,TranslatableComponentRenderer
public interface ComponentRenderer<C>
A component renderer.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> ComponentRenderer<T>
mapContext
(Function<T, C> transformer) Return aComponentRenderer
that takes a different context type.@NotNull Component
Renders a component.
-
Method Details
-
render
Renders a component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
mapContext
Return aComponentRenderer
that takes a different context type.- Type Parameters:
T
- transformation function- Parameters:
transformer
- context type transformer- Returns:
- mapping renderer
- Since:
- 4.0.0
-