Class AbstractObjectEncoderFactory

    • Constructor Detail

      • AbstractObjectEncoderFactory

        public AbstractObjectEncoderFactory()
    • Method Detail

      • isFactoryForType

        public final boolean isFactoryForType​(TokenType type)
        Description copied from interface: EncoderFactory
        Determine if this factory supports the given class type. A factory may support many types.
        Specified by:
        isFactoryForType in interface EncoderFactory
        Parameters:
        type - the type to check
        Returns:
        true if supported; false otherwise
      • newDecoder

        public final TokenDecoder newDecoder​(TokenType type)
        Description copied from interface: EncoderFactory
        Create a new decoder instance for the given type. The type is specified to allow a single factory to serve multiple types.
        Specified by:
        newDecoder in interface EncoderFactory
        Parameters:
        type - the type which is to be decoded
        Returns:
        a new decoder instance
      • newEncoder

        public TokenEncoder newEncoder​(TokenType type)
        Description copied from interface: EncoderFactory
        Create a new encoder instance for the given type. The type is specified to allow a single factory to serve multiple types.
        Specified by:
        newEncoder in interface EncoderFactory
        Parameters:
        type - the type which is to be encoded
        Returns:
        a new encoder instance
      • isFactoryForType

        protected abstract boolean isFactoryForType​(Class<?> type)
        Determine if this factory supports the given class type. A factory may support many types.
        Parameters:
        type - the type to check
        Returns:
        true if supported; false otherwise
      • newDecoder

        protected abstract TokenDecoder newDecoder​(Class<?> type)
        Create a new decoder instance for the given type. The type is specified to allow a single factory to serve multiple types.
        Parameters:
        type - the class which is to be decoded
        Returns:
        a new encoder instance
      • newEncoder

        protected abstract TokenEncoder newEncoder​(Class<?> type)
        Create a new encoder instance for the given type. The type is specified to allow a single factory to serve multiple types.
        Parameters:
        type - the class which is to be decoded
        Returns:
        a new decoder instance