|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.util.data.json.auto.Primitive<T>
T
- the primitive type or boxing classpublic abstract class Primitive<T>
Json serialization for basic types including primitive types and boxing classes as well as Strings.
Constructor Summary | |
---|---|
protected |
Primitive(Class<T> type)
Initializes the primitive for given type |
Method Summary | |
---|---|
Class<T> |
getType()
Returns the type of the primitive |
(package private) abstract T |
read(DuDeJsonParser<?> parser)
Reads the next value from the parser and returns it. |
(package private) abstract void |
write(T object,
DuDeJsonGenerator generator)
Writes the given primitive to the json stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Primitive(Class<T> type)
type
- Method Detail |
---|
public Class<T> getType()
abstract T read(DuDeJsonParser<?> parser) throws org.codehaus.jackson.JsonParseException, IOException
parser
- the parser
getType()
org.codehaus.jackson.JsonParseException
- If an error occurred while parsing the data.
IOException
- If an error occurred while reading from the stream.abstract void write(T object, DuDeJsonGenerator generator) throws org.codehaus.jackson.JsonGenerationException, IOException
object
- the object to writegenerator
- the DuDeJsonGenerator
rendering the passed value to json
org.codehaus.jackson.JsonGenerationException
- If an error occurs while generating the Json syntax.
IOException
- If an error occurs while accessing the underlying stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |