public abstract class AbstractGraphSONTypeSerializer
extends TypeSerializer
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class,Class> |
classMap |
protected TypeIdResolver |
idRes |
protected String |
propertyName |
protected TypeInfo |
typeInfo |
protected String |
valuePropertyName |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canWriteTypeId() |
TypeSerializer |
forProperty(BeanProperty beanProperty) |
protected abstract Class |
getClassFromObject(Object o)
We force only **one** translation of a Java object to a domain specific object.
|
String |
getPropertyName() |
TypeIdResolver |
getTypeIdResolver() |
JsonTypeInfo.As |
getTypeInclusion() |
void |
writeCustomTypePrefixForArray(Object o,
JsonGenerator jsonGenerator,
String s) |
void |
writeCustomTypePrefixForObject(Object o,
JsonGenerator jsonGenerator,
String s) |
void |
writeCustomTypePrefixForScalar(Object o,
JsonGenerator jsonGenerator,
String s) |
void |
writeCustomTypeSuffixForArray(Object o,
JsonGenerator jsonGenerator,
String s) |
void |
writeCustomTypeSuffixForObject(Object o,
JsonGenerator jsonGenerator,
String s) |
void |
writeCustomTypeSuffixForScalar(Object o,
JsonGenerator jsonGenerator,
String s) |
protected void |
writeTypePrefix(JsonGenerator jsonGenerator,
String s) |
void |
writeTypePrefixForArray(Object o,
JsonGenerator jsonGenerator) |
void |
writeTypePrefixForObject(Object o,
JsonGenerator jsonGenerator) |
void |
writeTypePrefixForScalar(Object o,
JsonGenerator jsonGenerator) |
protected void |
writeTypeSuffix(JsonGenerator jsonGenerator) |
void |
writeTypeSuffixForArray(Object o,
JsonGenerator jsonGenerator) |
void |
writeTypeSuffixForObject(Object o,
JsonGenerator jsonGenerator) |
void |
writeTypeSuffixForScalar(Object o,
JsonGenerator jsonGenerator) |
protected final TypeIdResolver idRes
protected final String propertyName
protected final TypeInfo typeInfo
protected final String valuePropertyName
public TypeSerializer forProperty(BeanProperty beanProperty)
public JsonTypeInfo.As getTypeInclusion()
public String getPropertyName()
public TypeIdResolver getTypeIdResolver()
public void writeTypePrefixForScalar(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeTypePrefixForObject(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeTypePrefixForArray(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeTypeSuffixForScalar(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeTypeSuffixForObject(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeTypeSuffixForArray(Object o, JsonGenerator jsonGenerator) throws IOException
IOExceptionpublic void writeCustomTypePrefixForScalar(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionpublic void writeCustomTypePrefixForObject(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionpublic void writeCustomTypePrefixForArray(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionpublic void writeCustomTypeSuffixForScalar(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionpublic void writeCustomTypeSuffixForObject(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionpublic void writeCustomTypeSuffixForArray(Object o, JsonGenerator jsonGenerator, String s) throws IOException
IOExceptionprotected boolean canWriteTypeId()
protected void writeTypePrefix(JsonGenerator jsonGenerator,
String s)
throws IOException
IOExceptionprotected void writeTypeSuffix(JsonGenerator jsonGenerator)
throws IOException
IOExceptionprotected abstract Class getClassFromObject(Object o)
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.