Interface CompoundEncoder<From,To>

Type Parameters:
From - the decoded type
To - the encoded type
All Superinterfaces:
Encoder<From,To>

public interface CompoundEncoder<From,To> extends Encoder<From,To>

A compound encoder is used in a CompositeEncoder to encode particular types of objects.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends From>
    boolean
    canEncode(Class<T> type)
    Determines whether the encoder can encode the type represented by the specified class.
    boolean
    Determines whether the encoder can encode the specified type.

    Methods inherited from interface io.inverno.mod.base.converter.Encoder

    encode, encode, encode
  • Method Details

    • canEncode

      <T extends From> boolean canEncode(Class<T> type)

      Determines whether the encoder can encode the type represented by the specified class.

      Type Parameters:
      T - the type of the object to encode
      Parameters:
      type - the class of the object to encode
      Returns:
      true if the encoder can encode the type, false otherwise
    • canEncode

      boolean canEncode(Type type)

      Determines whether the encoder can encode the specified type.

      Parameters:
      type - the type of the object to decode
      Returns:
      true if the encoder can encode the type, false otherwise