Interface ArgumentFactory

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  ArgumentFactory.Preparable
      ArgumentFactory extension interface that allows preparing arguments for efficient batch binding.
    • Method Detail

      • build

        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.
        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)