Package io.avaje.jsonb.spi
Interface ViewBuilder
-
public interface ViewBuilder
Builds a JsonView.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(String name, JsonAdapter<?> adapter, MethodHandle methodHandle)
Add a json property entry.void
addArray(String name, JsonAdapter<?> adapter, MethodHandle methodHandle)
Add a nested json array.void
beginObject(String name, MethodHandle methodHandle)
Begin a json object.void
endObject()
End a json object.MethodHandle
field(Class<?> cls, String name)
Return a MethodHandle for public field access for the given class and field name.MethodHandle
method(Class<?> cls, String methodName, Class<?> returnType)
Return a MethodHandle for the "getter/accessor" for the given class and field name.
-
-
-
Method Detail
-
beginObject
void beginObject(String name, MethodHandle methodHandle)
Begin a json object.
-
add
void add(String name, JsonAdapter<?> adapter, MethodHandle methodHandle)
Add a json property entry.- Parameters:
name
- The name of the json property.adapter
- The adapter used for the property.methodHandle
- The MethodHandle of the "getter/accessor" for the property.
-
addArray
void addArray(String name, JsonAdapter<?> adapter, MethodHandle methodHandle)
Add a nested json array.
-
endObject
void endObject()
End a json object.
-
field
MethodHandle field(Class<?> cls, String name)
Return a MethodHandle for public field access for the given class and field name.
-
method
MethodHandle method(Class<?> cls, String methodName, Class<?> returnType)
Return a MethodHandle for the "getter/accessor" for the given class and field name.
-
-