Interface SerializableResolver

All Known Subinterfaces:
SerializableResolver.Single

public interface SerializableResolver
A specific TagResolver that can process serialization requests for a component.
Since:
4.10.0
  • Method Details

    • claimingComponent

      static TagResolver claimingComponent(String name, BiFunction<ArgumentQueue, Context, Tag> handler, Function<Component, @Nullable Emitable> componentClaim)
      Create a tag resolver that only responds to a single tag name, and whose value does not depend on that name.
      Parameters:
      name - the name to respond to
      handler - the tag handler, may throw ParsingException if provided arguments are in an invalid format
      componentClaim - the claim to test components against
      Returns:
      a resolver that creates tags using the provided handler
      Since:
      4.10.0
    • claimingComponent

      static TagResolver claimingComponent(Set<String> names, BiFunction<ArgumentQueue, Context, Tag> handler, Function<Component, @Nullable Emitable> componentClaim)
      Create a tag resolver that only responds to certain tag names, and whose value does not depend on that name.
      Parameters:
      names - the names to respond to
      handler - the tag handler, may throw ParsingException if provided arguments are in an invalid format
      componentClaim - the claim to test components against
      Returns:
      a resolver that creates tags using the provided handler
      Since:
      4.10.0
    • claimingStyle

      static TagResolver claimingStyle(String name, BiFunction<ArgumentQueue, Context, Tag> handler, StyleClaim<?> styleClaim)
      Create a tag resolver that only responds to a single tag name, and whose value does not depend on that name.
      Parameters:
      name - the name to respond to
      handler - the tag handler, may throw ParsingException if provided arguments are in an invalid format
      styleClaim - the extractor for style claims on components
      Returns:
      a resolver that creates tags using the provided handler
      Since:
      4.10.0
    • claimingStyle

      static TagResolver claimingStyle(Set<String> names, BiFunction<ArgumentQueue, Context, Tag> handler, StyleClaim<?> styleClaim)
      Create a tag resolver that only responds to certain tag names, and whose value does not depend on that name.
      Parameters:
      names - the names to respond to
      handler - the tag handler, may throw ParsingException if provided arguments are in an invalid format
      styleClaim - the extractor for style claims on components
      Returns:
      a resolver that creates tags using the provided handler
      Since:
      4.10.0
    • handle

      void handle(Component serializable, ClaimConsumer consumer)
      Attempt to process a component for serialization.
      Parameters:
      serializable - the component to serialize
      consumer - a consumer for component claims, must not be stored
      Since:
      4.10.0