public abstract class AbstractRxGenerator extends Generator<ClassModel>
env, incremental, kinds, name| Constructor and Description |
|---|
AbstractRxGenerator(String id) |
| Modifier and Type | Method and Description |
|---|---|
Collection<Class<? extends Annotation>> |
annotations() |
String |
filename(ClassModel model)
Generate the file name for the
model. |
protected String |
genFutureMethodName(MethodInfo method) |
protected void |
genMethod(ClassModel model,
MethodInfo method,
List<String> cacheDecls,
PrintWriter writer) |
protected abstract void |
genMethods(ClassModel model,
MethodInfo method,
List<String> cacheDecls,
PrintWriter writer) |
protected abstract void |
genReadStream(List<? extends TypeParamInfo> typeParams,
PrintWriter writer) |
protected void |
genRxImports(ClassModel model,
PrintWriter writer) |
protected abstract void |
genRxMethod(ClassModel model,
MethodInfo method,
PrintWriter writer) |
protected abstract void |
genToObservable(TypeInfo streamType,
PrintWriter writer) |
protected abstract void |
genToSubscriber(TypeInfo streamType,
PrintWriter writer) |
protected String |
genTypeName(TypeInfo type) |
String |
render(ClassModel model,
int index,
int size,
Map<String,Object> session)
Render the model
|
protected void |
startMethodTemplate(ClassTypeInfo type,
MethodInfo method,
String deprecated,
PrintWriter writer) |
public AbstractRxGenerator(String id)
public Collection<Class<? extends Annotation>> annotations()
annotations in class Generator<ClassModel>public String filename(ClassModel model)
Generatormodel.
When the returned value
null, no file is created/ and ends with .java, the file is created as a source file by the annotation processor
and the class will be compiled by the current compilation processresources/ prefix, the file is created as a resource file by the annotation processor using the
remaining suffix value and the file will likely end in the classes directory/ is created relative to the codegen.output directoryfilename in class Generator<ClassModel>model - the modelnull if no generation should happenpublic String render(ClassModel model, int index, int size, Map<String,Object> session)
Generatorrender in class Generator<ClassModel>model - the modelindex - the index for an incremental generatorsize - the number of models for an incremental generatorsession - the sessionnullprotected abstract void genReadStream(List<? extends TypeParamInfo> typeParams, PrintWriter writer)
protected abstract void genToObservable(TypeInfo streamType, PrintWriter writer)
protected abstract void genToSubscriber(TypeInfo streamType, PrintWriter writer)
protected abstract void genMethods(ClassModel model, MethodInfo method, List<String> cacheDecls, PrintWriter writer)
protected abstract void genRxMethod(ClassModel model, MethodInfo method, PrintWriter writer)
protected final void genMethod(ClassModel model, MethodInfo method, List<String> cacheDecls, PrintWriter writer)
protected void startMethodTemplate(ClassTypeInfo type, MethodInfo method, String deprecated, PrintWriter writer)
protected String genFutureMethodName(MethodInfo method)
protected void genRxImports(ClassModel model, PrintWriter writer)
Copyright © 2020. All rights reserved.