public abstract class AbstractJsonMapperGenerator extends Object
Abstract AbstractJsonMapperGenerator class.
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractJsonMapperGenerator.AccessorInfo |
| Modifier and Type | Field and Description |
|---|---|
protected TypeMirror |
beanType |
protected String |
packageName |
protected SubTypesInfo |
subTypesInfo |
| Constructor and Description |
|---|
AbstractJsonMapperGenerator(String packageName,
TypeMirror beanType,
Filer filer)
Constructor for AbstractJsonMapperGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
generate()
generate.
|
protected com.squareup.javapoet.CodeBlock |
generateTypeInfo()
Build the code to initialize a
TypeSerializationInfo or TypeDeserializationInfo. |
protected abstract Class<?> |
getMapperType() |
protected abstract com.squareup.javapoet.MethodSpec |
initMethod()
initMethod.
|
protected abstract com.squareup.javapoet.MethodSpec |
initSubtypesMethod()
initMethod.
|
protected boolean |
isEligibleForSerializationDeserialization(Element field) |
protected boolean |
isIgnored(Element field)
isIgnored
|
protected boolean |
isNotStatic(Element field)
isNotStatic
|
protected Set<com.squareup.javapoet.MethodSpec> |
moreMethods()
moreMethods.
|
protected abstract String |
namePostfix()
namePostfix.
|
protected Map<Element,TypeMirror> |
orderedFields()
orderedFields.
|
protected abstract com.squareup.javapoet.TypeName |
superClass()
superClass.
|
protected abstract String |
targetTypeMethodName()
targetTypeMethodName.
|
protected final TypeMirror beanType
protected final SubTypesInfo subTypesInfo
protected final String packageName
public AbstractJsonMapperGenerator(String packageName, TypeMirror beanType, Filer filer)
Constructor for AbstractJsonMapperGenerator.
beanType - a TypeMirror object.packageName - a String object.filer - a Filer object.protected void generate()
throws IOException
generate.
IOException - if any.protected abstract com.squareup.javapoet.TypeName superClass()
superClass.
TypeName object.protected abstract String targetTypeMethodName()
targetTypeMethodName.
String object.protected Set<com.squareup.javapoet.MethodSpec> moreMethods()
moreMethods.
Set object.protected abstract com.squareup.javapoet.MethodSpec initMethod()
initMethod.
MethodSpec object.protected abstract com.squareup.javapoet.MethodSpec initSubtypesMethod()
initMethod.
MethodSpec object.protected Map<Element,TypeMirror> orderedFields()
orderedFields.
List object.protected boolean isNotStatic(Element field)
isNotStatic
Check if given field has static modifierfield - Element objectprotected boolean isIgnored(Element field)
isIgnored
Check if given field has been annotated withJsonIgnore present and its value is truefield - Element objectJsonIgnore present and its value is trueprotected boolean isEligibleForSerializationDeserialization(Element field)
protected abstract Class<?> getMapperType()
protected final com.squareup.javapoet.CodeBlock generateTypeInfo()
TypeSerializationInfo or TypeDeserializationInfo.Copyright © 2020. All rights reserved.