public interface ViewBuilder
Builds a JsonView.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
End a json object.Return a MethodHandle for public field access for the given class and field name.Return a MethodHandle for the "getter/accessor" for the given class and field name.
-
Method Details
-
beginObject
Begin a json object. -
add
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
Add a nested json array. -
endObject
void endObject()End a json object. -
field
Return a MethodHandle for public field access for the given class and field name. -
method
Return a MethodHandle for the "getter/accessor" for the given class and field name.
-