Mechanizm renderowania
Renderer
to klasa fabryczna, która łączy wszystkie pozostałe komponenty mechanizmu renderowania.
Zawiera metody tworzenia dostawcy stałego, informacji o renderowaniu, obiektu ścieżki i szuflady.
Zawiera też kod umożliwiający połączenie wszystkich elementów podczas renderowania bloku.
Jeśli chcesz zmienić tylko jedną część istniejącego mechanizmu renderowania (np. stałą), możesz zaklasyfikować odpowiednią metodę fabryczną.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2023-07-24 UTC.
[null,null,["Ostatnia aktualizacja: 2023-07-24 UTC."],[[["The `Renderer` is a factory class that groups together all the components of a renderer, including methods for creating constant providers, render info, path objects, and drawers."],["It manages the process of connecting and utilizing these components when rendering a block."],["Customizing specific aspects of a renderer, like constants, can be achieved by subclassing the corresponding factory method."]]],["The `Renderer` class acts as a central factory, managing components like the constant provider, render info, path object, and drawer. It includes methods for creating these elements and orchestrates their interaction during block rendering. Customization of existing renderers is achievable by subclassing specific factory methods within the `Renderer` class, allowing modification of individual parts, like constants. This class essentially bundles and connects all the elements required for rendering a block.\n"]]