Interface VirtualComponentRenderer<C>

Type Parameters:
C - the context type

public interface VirtualComponentRenderer<C>
A holder for a value.
Since:
4.18.0
  • Method Summary

    Modifier and Type
    Method
    Description
    @UnknownNullability ComponentLike
    apply(C context)
    Gets the value by rendering using context.
    default @NotNull String
    Get a fallback value for when this component has been serialized without being rendered.
  • Method Details

    • apply

      @UnknownNullability ComponentLike apply(@NotNull C context)
      Gets the value by rendering using context.
      Parameters:
      context - the context
      Returns:
      the rendered value
      Since:
      4.18.0
    • fallbackString

      @NotNull default @NotNull String fallbackString()
      Get a fallback value for when this component has been serialized without being rendered.

      By default, this will be an empty string.

      Returns:
      the fallback string
      Since:
      4.18.0