Package org.kohsuke.stapler.export
Interface DataWriter
-
public interface DataWriter
Receives the event callback on the model data to be exposed.The call sequence is:
EVENTS := type? startObject PROPERTY* endObject PROPERTY := name VALUE VALUE := valuePrimitive | value | valueNull | startArray VALUE* endArray | EVENTS
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLASS_PROPERTY_NAME
Recommended property name to write out the 'type' parameter oftype(Type,Class)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
endArray()
void
endObject()
default ExportConfig
getExportConfig()
void
name(String name)
void
startArray()
void
startObject()
default void
type(Type expected, Class actual)
Augments the nextstartObject()
call by specifying the type information of that object.void
value(String v)
void
valueNull()
void
valuePrimitive(Object v)
-
-
-
Field Detail
-
CLASS_PROPERTY_NAME
static final String CLASS_PROPERTY_NAME
Recommended property name to write out the 'type' parameter oftype(Type,Class)
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
void name(String name) throws IOException
- Throws:
IOException
-
valuePrimitive
void valuePrimitive(Object v) throws IOException
- Throws:
IOException
-
value
void value(String v) throws IOException
- Throws:
IOException
-
valueNull
void valueNull() throws IOException
- Throws:
IOException
-
startArray
void startArray() throws IOException
- Throws:
IOException
-
endArray
void endArray() throws IOException
- Throws:
IOException
-
type
default void type(@Nullable Type expected, @Nullable Class actual) throws IOException
Augments the nextstartObject()
call by specifying the type information of that object.- Parameters:
expected
- The declared type of the variable that references this object. Null if the object is not referenced by anyone, for example when it's the root.actual
- The actual type of the object being written. Null if the object is synthetic and has no valid Java type- Throws:
IOException
-
startObject
void startObject() throws IOException
- Throws:
IOException
-
endObject
void endObject() throws IOException
- Throws:
IOException
-
getExportConfig
@NonNull default ExportConfig getExportConfig()
-
-