We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5696240 commit 1218e9cCopy full SHA for 1218e9c
docs/asciidoc/value-api.adoc
@@ -428,4 +428,22 @@ class Member {
428
class Member (@Named("first-name") val firstname: String, @Named("last-name") val lastName: String)
429
----
430
431
-{love}{love}
+==== Value Factory
432
+
433
+The javadoc:value.ValueFactory[] class allow you to register new types for conversion (or even override).
434
435
+[source,java]
436
+----
437
+{
438
+ var valueFactory = getValueFactory();
439
+ valueFactory.put(MyBean.class, new MyBeanConverter());
440
+}
441
442
+import io.jooby.value.ValueConverter;
443
444
+class MyBeanConverter implements ValueConverter {
445
+ public Object convert(Type type, Value node, ConversionHint hint) {
446
+ // convert node to MyBean.class
447
+ }
448
449
0 commit comments