Util.DecoderMatch (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket, class: Util, class: DecoderMatch

# Class Util.DecoderMatch

java.lang.Object
org.apache.tomcat.websocket.Util.DecoderMatch

Enclosing class:
  `Util`

public static class Util.DecoderMatch extends Object
Holds the result of matching decoders against a target type.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DecoderMatch(Class<?> target, List<DecoderEntry> decoderEntries)`
  Constructs a new DecoderMatch by matching decoder entries against the target type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<Class<? extends Decoder>>`
  `getBinaryDecoders()`
  Returns the list of matched binary decoders.
  `Class<?>`
  `getTarget()`
  Returns the target type that decoders were matched against.
  `List<Class<? extends Decoder>>`
  `getTextDecoders()`
  Returns the list of matched text decoders.
  `boolean`
  `hasMatches()`
  Returns whether any decoders matched the target type.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DecoderMatch

    public DecoderMatch(Class<?> target, List<DecoderEntry> decoderEntries)
    Constructs a new DecoderMatch by matching decoder entries against the target type.
    Parameters:
      `target` - The target type to match decoders against
      `decoderEntries` - The available decoder entries
    Throws:
      `IllegalArgumentException` - If an unknown decoder type is encountered

- ## Method Details

  - ### getTextDecoders

    public List<Class<? extends Decoder>> getTextDecoders()
    Returns the list of matched text decoders.
    Returns:
      the list of text decoder classes

  - ### getBinaryDecoders

    public List<Class<? extends Decoder>> getBinaryDecoders()
    Returns the list of matched binary decoders.
    Returns:
      the list of binary decoder classes

  - ### getTarget

    public Class<?> getTarget()
    Returns the target type that decoders were matched against.
    Returns:
      the target type

  - ### hasMatches

    public boolean hasMatches()
    Returns whether any decoders matched the target type.
    Returns:
      `true` if there are matching text or binary decoders, `false` otherwise