public abstract class AbstractBeanJsonCreator extends AbstractCreator
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractBeanJsonCreator.TypeParameters |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ABSTRACT_BEAN_JSON_DESERIALIZER_CLASS |
protected static String |
ABSTRACT_BEAN_JSON_SERIALIZER_CLASS |
protected BeanJsonMapperInfo |
mapperInfo |
protected static String |
TYPE_DESERIALIZATION_INFO_CLASS |
protected static String |
TYPE_PARAMETER_PREFIX |
protected static String |
TYPE_SERIALIZATION_INFO_CLASS |
configuration, context, JSON_DESERIALIZATION_CONTEXT_CLASS, JSON_DESERIALIZER_CLASS, JSON_SERIALIZATION_CONTEXT_CLASS, JSON_SERIALIZER_CLASS, logger, TYPE_PARAMETER_DESERIALIZER_FIELD_NAME, TYPE_PARAMETER_SERIALIZER_FIELD_NAME, typeOracle| Constructor and Description |
|---|
AbstractBeanJsonCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
RebindConfiguration configuration,
JacksonTypeOracle typeOracle) |
| Modifier and Type | Method and Description |
|---|---|
String |
create(com.google.gwt.core.ext.typeinfo.JClassType beanType)
Creates an implementation of
AbstractBeanJsonSerializer for the type given in
parameter |
protected com.google.gwt.core.ext.typeinfo.JClassType |
findFirstTypeToApplyPropertyAnnotation(JMapperType mapperType) |
protected void |
generateCommonPropertyParameters(com.google.gwt.user.rebind.SourceWriter source,
PropertyInfo property,
JMapperType mapperType) |
protected void |
generateIdentifierDeserializationInfo(com.google.gwt.user.rebind.SourceWriter source,
com.google.gwt.core.ext.typeinfo.JClassType type,
BeanIdentityInfo identityInfo) |
protected void |
generateIdentifierSerializationInfo(com.google.gwt.user.rebind.SourceWriter source,
com.google.gwt.core.ext.typeinfo.JClassType type,
BeanIdentityInfo identityInfo) |
protected void |
generateTypeInfo(com.google.gwt.user.rebind.SourceWriter source,
BeanTypeInfo typeInfo,
boolean serialization) |
protected AbstractBeanJsonCreator.TypeParameters |
generateTypeParameterMapperFields(com.google.gwt.user.rebind.SourceWriter source,
BeanInfo beanInfo,
String mapperClass,
String mapperNameFormat) |
protected String |
getGenericClassBoundedParameters() |
protected String |
getQualifiedClassName(com.google.gwt.core.ext.typeinfo.JType type) |
protected String |
getSimpleClassName() |
protected String |
getSuperclass() |
protected abstract boolean |
isSerializer() |
protected abstract void |
writeClassBody(com.google.gwt.user.rebind.SourceWriter source,
BeanInfo info,
com.google.gwt.thirdparty.guava.common.collect.ImmutableMap<String,PropertyInfo> properties) |
getJsonDeserializerFromType, getJsonSerializerFromType, getKeyDeserializerFromType, getKeySerializerFromType, getPrintWriter, getSourceWriterprotected static final String TYPE_PARAMETER_PREFIX
protected static final String ABSTRACT_BEAN_JSON_DESERIALIZER_CLASS
protected static final String ABSTRACT_BEAN_JSON_SERIALIZER_CLASS
protected static final String TYPE_DESERIALIZATION_INFO_CLASS
protected static final String TYPE_SERIALIZATION_INFO_CLASS
protected BeanJsonMapperInfo mapperInfo
public AbstractBeanJsonCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
RebindConfiguration configuration,
JacksonTypeOracle typeOracle)
public String create(com.google.gwt.core.ext.typeinfo.JClassType beanType) throws com.google.gwt.core.ext.UnableToCompleteException
AbstractBeanJsonSerializer for the type given in
parameterbeanType - type of the beancom.google.gwt.core.ext.UnableToCompleteExceptionprotected abstract boolean isSerializer()
protected String getSimpleClassName()
protected String getGenericClassBoundedParameters()
protected String getSuperclass()
protected abstract void writeClassBody(com.google.gwt.user.rebind.SourceWriter source,
BeanInfo info,
com.google.gwt.thirdparty.guava.common.collect.ImmutableMap<String,PropertyInfo> properties)
throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionprotected AbstractBeanJsonCreator.TypeParameters generateTypeParameterMapperFields(com.google.gwt.user.rebind.SourceWriter source, BeanInfo beanInfo, String mapperClass, String mapperNameFormat) throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionprotected String getQualifiedClassName(com.google.gwt.core.ext.typeinfo.JType type)
protected void generateIdentifierSerializationInfo(com.google.gwt.user.rebind.SourceWriter source,
com.google.gwt.core.ext.typeinfo.JClassType type,
BeanIdentityInfo identityInfo)
throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionprotected void generateIdentifierDeserializationInfo(com.google.gwt.user.rebind.SourceWriter source,
com.google.gwt.core.ext.typeinfo.JClassType type,
BeanIdentityInfo identityInfo)
throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionprotected void generateTypeInfo(com.google.gwt.user.rebind.SourceWriter source,
BeanTypeInfo typeInfo,
boolean serialization)
throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionprotected com.google.gwt.core.ext.typeinfo.JClassType findFirstTypeToApplyPropertyAnnotation(JMapperType mapperType)
protected void generateCommonPropertyParameters(com.google.gwt.user.rebind.SourceWriter source,
PropertyInfo property,
JMapperType mapperType)
throws com.google.gwt.core.ext.UnableToCompleteException
com.google.gwt.core.ext.UnableToCompleteExceptionCopyright © 2014. All Rights Reserved.