Class JsonArgumentFactory

  • All Implemented Interfaces:
    ArgumentFactory

    public class JsonArgumentFactory
    extends java.lang.Object
    implements ArgumentFactory
    converts a value object to json text and delegates to another factory to perform the (@Json) String binding
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String JSON_NOT_STORABLE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<Argument> build​(java.lang.reflect.Type type, java.lang.Object value, ConfigRegistry config)
      Returns an Argument for the given value if the factory supports it; empty otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JSON_NOT_STORABLE

        private static final java.lang.String JSON_NOT_STORABLE
    • Constructor Detail

      • JsonArgumentFactory

        public JsonArgumentFactory()
    • Method Detail

      • build

        public java.util.Optional<Argument> build​(java.lang.reflect.Type type,
                                                  java.lang.Object value,
                                                  ConfigRegistry config)
        Description copied from interface: ArgumentFactory
        Returns an Argument for the given value if the factory supports it; empty otherwise.
        Specified by:
        build in interface ArgumentFactory
        Parameters:
        type - the known type of value. Depending on the situation this may be a full generic signature e.g. ParameterizedType, a Class, or Object.class if no type information is known.
        value - the value to convert into an Argument
        config - the config registry, for composition
        Returns:
        an argument for the given value if this factory supports it, or Optional.empty() otherwise.
        See Also:
        StatementContext.findArgumentFor(Type, Object), Arguments.findFor(Type, Object)