com.holonplatform.core.property

## Interface PropertyRenderer<R,T>

- Type Parameters:
    `R` - Rendering type
    `T` - Property type

      public interface PropertyRenderer<R,T>

  Renderer to render a `Property` as a the target `getRenderType()` object type.

  PropertyRenderers are managed by a `PropertyRendererRegistry`, which handles the renderers registration and returns a suitable renderer for a `Property` and a given rendering type relying on the conditions with which the renderers were registered.

  Since:
    5.0.0
  See Also:
    `PropertyRendererRegistry`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_PRIORITY` Default `PropertyRenderer` priority if not specified using `Priority` annotation.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <R,T> PropertyRenderer<R,T>` | `create(Class<? extends R> renderingType, Function<Property<T>,R> renderer)` Create a `PropertyRenderer` for given `renderingType` using given `renderer` `Function` to perform actual property rendering.
    `Class<? extends R>` | `getRenderType()` Return the object type handled by this renderer and returned by the `render(Property)` method.
    `R` | `render(Property<T> property)` Renders the given `property` as a `getRenderType()` object

- - ### Field Detail

    - #### DEFAULT_PRIORITY

          static final int DEFAULT_PRIORITY

      Default `PropertyRenderer` priority if not specified using `Priority` annotation.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getRenderType

          Class<? extends R> getRenderType()

      Return the object type handled by this renderer and returned by the `render(Property)` method.
      Returns:
        Render type

    - #### render

          R render(Property<T> property)

      Renders the given `property` as a `getRenderType()` object
      Parameters:
        `property` - Property to render
      Returns:
        Rendered property object according to render type

    - #### create

          static <R,T> PropertyRenderer<R,T> create(Class<? extends R> renderingType,
                                                    Function<Property<T>,R> renderer)

      Create a `PropertyRenderer` for given `renderingType` using given `renderer` `Function` to perform actual property rendering.
      Type Parameters:
        `R` - Rendering type
        `T` - Property type
      Parameters:
        `renderingType` - Rendering type (not null)
        `renderer` - Rendering function (not null)
      Returns:
        The `PropertyRenderer` instance

Copyright © 2017 The Holon Platform. All rights reserved.