Interface ToXContent
-
- All Known Subinterfaces:
ToXContentFragment
,ToXContentObject
public interface ToXContent
An interface allowing to transfer an object to "XContent" using anXContentBuilder
. The output may or may not be a value object. Objects implementingToXContentObject
output a valid value but those that don't may or may not require emitting a startObject and an endObject.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ToXContent.DelegatingMapParams
static class
ToXContent.MapParams
static interface
ToXContent.Params
-
Field Summary
Fields Modifier and Type Field Description static ToXContent.Params
EMPTY_PARAMS
-
Method Summary
Modifier and Type Method Description default boolean
isFragment()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
-
-
-
Field Detail
-
EMPTY_PARAMS
static final ToXContent.Params EMPTY_PARAMS
-
-
Method Detail
-
toXContent
XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
isFragment
default boolean isFragment()
-
-