public class FactoryWrapper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FACTORY_FIELD_TPL |
static String |
WITH_FACTORIES |
| Constructor and Description |
|---|
FactoryWrapper(AnnotationWrapper mapperAnnotation,
MapperGeneratorContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
emitFactoryFields(com.squareup.javawriter.JavaWriter writer,
boolean assign)
Generates the code to declare custom factory fields, setter and call default constructor in mapper constructor
|
MappingSourceNode |
generateNewInstanceSourceNodes(InOutType inOutType,
BeanWrapper outBeanWrapper)
Called to search for a matching factory and return the corresponding MappingSourceNode
|
boolean |
hasFactory(TypeMirror typeMirror) |
void |
reportUnused() |
public static final String FACTORY_FIELD_TPL
public static final String WITH_FACTORIES
public FactoryWrapper(AnnotationWrapper mapperAnnotation, MapperGeneratorContext context)
public void emitFactoryFields(com.squareup.javawriter.JavaWriter writer,
boolean assign)
throws IOException
writer - assign - IOExceptionpublic void reportUnused()
public MappingSourceNode generateNewInstanceSourceNodes(InOutType inOutType, BeanWrapper outBeanWrapper)
inOutType - the type association we are currently mappingoutBeanWrapper - The Bean wrapper of the bean we want to buildpublic boolean hasFactory(TypeMirror typeMirror)
Copyright © 2017. All Rights Reserved.