public abstract class AbstractCreator
extends com.google.gwt.user.rebind.AbstractSourceCreator
| Modifier and Type | Field and Description |
|---|---|
protected RebindConfiguration |
configuration |
protected com.google.gwt.core.ext.GeneratorContext |
context |
protected com.google.gwt.core.ext.TreeLogger |
logger |
protected static String |
TYPE_PARAMETER_DESERIALIZER_FIELD_NAME |
protected static String |
TYPE_PARAMETER_SERIALIZER_FIELD_NAME |
protected JacksonTypeOracle |
typeOracle |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
RebindConfiguration configuration,
JacksonTypeOracle typeOracle) |
| Modifier and Type | Method and Description |
|---|---|
protected JDeserializerType |
getJsonDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type)
Build a
JDeserializerType that instantiate a JsonSerializer for the given type. |
protected JDeserializerType |
getJsonDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type,
boolean subtype)
Build a
JDeserializerType that instantiate a JsonSerializer for the given type. |
protected JSerializerType |
getJsonSerializerFromType(com.google.gwt.core.ext.typeinfo.JType type)
Build a
JSerializerType that instantiate a JsonSerializer for the given type. |
protected JSerializerType |
getJsonSerializerFromType(com.google.gwt.core.ext.typeinfo.JType type,
boolean subtype)
Build a
JSerializerType that instantiate a JsonSerializer for the given type. |
protected JDeserializerType |
getKeyDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type)
Build the
JDeserializerType that instantiate a KeyDeserializer for the given type. |
protected JSerializerType |
getKeySerializerFromType(com.google.gwt.core.ext.typeinfo.JType type)
Build the
JSerializerType that instantiate a KeySerializer for the given type. |
protected abstract com.google.gwt.thirdparty.guava.common.base.Optional<BeanJsonMapperInfo> |
getMapperInfo() |
protected BeanJsonMapperInfo |
getMapperInfo(com.google.gwt.core.ext.typeinfo.JClassType beanType)
Returns the mapper information for the given type.
|
protected PrintWriter |
getPrintWriter(String packageName,
String className)
Creates the
PrintWriter to write the class. |
protected void |
write(String packageName,
com.squareup.javapoet.TypeSpec type,
PrintWriter printWriter)
Writes the given type to the
PrintWriter. |
protected static final String TYPE_PARAMETER_DESERIALIZER_FIELD_NAME
protected static final String TYPE_PARAMETER_SERIALIZER_FIELD_NAME
protected final com.google.gwt.core.ext.TreeLogger logger
protected final com.google.gwt.core.ext.GeneratorContext context
protected final RebindConfiguration configuration
protected final JacksonTypeOracle typeOracle
protected AbstractCreator(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.GeneratorContext context,
RebindConfiguration configuration,
JacksonTypeOracle typeOracle)
protected final PrintWriter getPrintWriter(String packageName, String className)
PrintWriter to write the class.packageName - the packageclassName - the name of the classPrintWriter or null if the class already exists.protected final void write(String packageName, com.squareup.javapoet.TypeSpec type, PrintWriter printWriter) throws com.google.gwt.core.ext.UnableToCompleteException
PrintWriter.packageName - the package for the typetype - the typeprintWriter - the writercom.google.gwt.core.ext.UnableToCompleteException - if an exception is thrown by the writerprotected final BeanJsonMapperInfo getMapperInfo(com.google.gwt.core.ext.typeinfo.JClassType beanType) throws com.google.gwt.core.ext.UnableToCompleteException
beanType - the typecom.google.gwt.core.ext.UnableToCompleteException - if an exception occured while processing the typeprotected abstract com.google.gwt.thirdparty.guava.common.base.Optional<BeanJsonMapperInfo> getMapperInfo()
protected final JSerializerType getJsonSerializerFromType(com.google.gwt.core.ext.typeinfo.JType type) throws com.google.gwt.core.ext.UnableToCompleteException, UnsupportedTypeException
JSerializerType that instantiate a JsonSerializer for the given type. If the type is a bean,
the implementation of AbstractBeanJsonSerializer will be created.type - typeJSerializerType. Examples:
com.google.gwt.core.ext.UnableToCompleteExceptionUnsupportedTypeExceptionprotected final JSerializerType getJsonSerializerFromType(com.google.gwt.core.ext.typeinfo.JType type, boolean subtype) throws com.google.gwt.core.ext.UnableToCompleteException, UnsupportedTypeException
JSerializerType that instantiate a JsonSerializer for the given type. If the type is a bean,
the implementation of AbstractBeanJsonSerializer will be created.type - typesubtype - true if the serializer is for a subtypeJSerializerType. Examples:
com.google.gwt.core.ext.UnableToCompleteExceptionUnsupportedTypeExceptionprotected final JSerializerType getKeySerializerFromType(com.google.gwt.core.ext.typeinfo.JType type) throws UnsupportedTypeException
JSerializerType that instantiate a KeySerializer for the given type.type - typeJSerializerType.UnsupportedTypeExceptionprotected final JDeserializerType getJsonDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type) throws com.google.gwt.core.ext.UnableToCompleteException, UnsupportedTypeException
JDeserializerType that instantiate a JsonSerializer for the given type. If the type is a bean,
the implementation of AbstractBeanJsonSerializer will be created.type - typeJDeserializerType. Examples:
com.google.gwt.core.ext.UnableToCompleteExceptionUnsupportedTypeExceptionprotected final JDeserializerType getJsonDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type, boolean subtype) throws com.google.gwt.core.ext.UnableToCompleteException, UnsupportedTypeException
JDeserializerType that instantiate a JsonSerializer for the given type. If the type is a bean,
the implementation of AbstractBeanJsonSerializer will be created.type - typesubtype - true if the deserializer is for a subtypeJDeserializerType. Examples:
com.google.gwt.core.ext.UnableToCompleteExceptionUnsupportedTypeExceptionprotected final JDeserializerType getKeyDeserializerFromType(com.google.gwt.core.ext.typeinfo.JType type) throws UnsupportedTypeException
JDeserializerType that instantiate a KeyDeserializer for the given type.type - typeJDeserializerType.UnsupportedTypeExceptionCopyright © 2016. All Rights Reserved.