All Superinterfaces:
SerializableResolver
Enclosing interface:
SerializableResolver

public static interface SerializableResolver.Single extends SerializableResolver
A subinterface for resolvers that only handle one single tag.
Since:
4.10.0
  • Method Details

    • handle

      default void handle(Component serializable, ClaimConsumer consumer)
      Description copied from interface: SerializableResolver
      Attempt to process a component for serialization.
      Specified by:
      handle in interface SerializableResolver
      Parameters:
      serializable - the component to serialize
      consumer - a consumer for component claims, must not be stored
    • claimStyle

      default @Nullable StyleClaim<?> claimStyle()
      Claim a style for tag emission.

      Style emitters are additive -- a non-null result will not terminate traversal of iterable tags. However, each style element can only be claimed once.

      Returns:
      an emitable if this claimer handles some element of the provided style
      Since:
      4.10.0
    • claimComponent

      default @Nullable Emitable claimComponent(Component component)
      Claim a full component for tag emission.

      The first non-null result will be the only handler for this component. The component's style will be handled separately.

      Children of the provided component should be ignored.

      Parameters:
      component - the component to inspect
      Returns:
      an emitable if this claimer handles the provided component type
      Since:
      4.10.0