public abstract class Spin<T extends Spin<?>> extends Object
Constructor and Description |
---|
Spin() |
Modifier and Type | Method and Description |
---|---|
abstract String |
getDataFormatName()
Provides the name of the dataformat used by this spin.
|
static SpinJsonNode |
JSON(Object input)
Creates a spin wrapper for a data input.
|
abstract <C> C |
mapTo(Class<C> type)
Maps the wrapped object to an instance of a java class.
|
abstract <C> C |
mapTo(String type)
Maps the wrapped object to a java object.
|
static <T extends Spin<?>> |
S(Object input)
Creates a spin wrapper for a data input.
|
static <T extends Spin<?>> |
S(Object input,
DataFormat<T> format)
Creates a spin wrapper for a data input of a given data format.
|
static <T extends Spin<?>> |
S(Object input,
String dataFormatName)
Creates a spin wrapper for a data input of a given data format.
|
abstract String |
toString()
Returns the wrapped object as string representation.
|
abstract Object |
unwrap()
Return the wrapped object.
|
abstract void |
writeToWriter(Writer writer)
Writes the wrapped object to a existing writer.
|
static SpinXmlElement |
XML(Object input)
Creates a spin wrapper for a data input.
|
public static <T extends Spin<?>> T S(Object input, DataFormat<T> format)
input
- the input to wrapformat
- the data format of the inputIllegalArgumentException
- in case an argument of illegal type is provided (such as 'null')public static <T extends Spin<?>> T S(Object input, String dataFormatName)
input
- the input to wrapdataFormatName
- the data format name of the inputIllegalArgumentException
- in case an argument of illegal type is provided (such as 'null')public static <T extends Spin<?>> T S(Object input)
input
- the input to wrapIllegalArgumentException
- in case an argument of illegal type is provided (such as 'null')public static SpinXmlElement XML(Object input)
input
- the input to wrapIllegalArgumentException
- in case an argument of illegal type is provided (such as 'null')public static SpinJsonNode JSON(Object input)
input
- the input to wrapIllegalArgumentException
- in case an argument of illegal type is provided (such as 'null')public abstract String getDataFormatName()
public abstract Object unwrap()
public abstract String toString()
public abstract void writeToWriter(Writer writer)
writer
- the writer to write topublic abstract <C> C mapTo(Class<C> type)
type
- the java class to map topublic abstract <C> C mapTo(String type)
type
- the class name to map toCopyright © 2019 Camunda Services GmbH. All rights reserved.