6161import com .googlecode .androidannotations .annotations .res .TextArrayRes ;
6262import com .googlecode .androidannotations .annotations .res .TextRes ;
6363import com .googlecode .androidannotations .generation .CodeModelGenerator ;
64- import com .googlecode .androidannotations .generation .StringModelGenerator ;
6564import com .googlecode .androidannotations .model .AndroidRes ;
6665import com .googlecode .androidannotations .model .AndroidSystemServices ;
6766import com .googlecode .androidannotations .model .AnnotationElements ;
6867import com .googlecode .androidannotations .model .AnnotationElementsHolder ;
6968import com .googlecode .androidannotations .model .EmptyAnnotationElements ;
70- import com .googlecode .androidannotations .model .MetaModel ;
7169import com .googlecode .androidannotations .model .ModelExtractor ;
7270import com .googlecode .androidannotations .processing .BackgroundProcessor ;
7371import com .googlecode .androidannotations .processing .BeforeCreateProcessor ;
@@ -185,12 +183,9 @@ private void processThrowing(Set<? extends TypeElement> annotations, RoundEnviro
185183
186184 AnnotationElements validatedModel = validateAnnotations (extractedModel , rClass , androidSystemServices );
187185
188- JCodeModel codeModel = processAnnotationsToCodeModel (validatedModel , rClass , androidSystemServices );
186+ JCodeModel codeModel = processAnnotations (validatedModel , rClass , androidSystemServices );
189187
190- MetaModel stringModel = processAnnotationsToStringModel (validatedModel , rClass , androidSystemServices );
191-
192- generateStringModelSources (stringModel );
193- generateCodeModelSources (codeModel );
188+ generateSources (codeModel );
194189 }
195190
196191 private AnnotationElementsHolder extractAnnotations (Set <? extends TypeElement > annotations , RoundEnvironment roundEnv ) {
@@ -244,14 +239,9 @@ private ModelValidator buildModelValidator(IRClass rClass, AndroidSystemServices
244239 return modelValidator ;
245240 }
246241
247- private JCodeModel processAnnotationsToCodeModel (AnnotationElements validatedModel , IRClass rClass , AndroidSystemServices androidSystemServices ) {
248- ModelProcessor modelProcessor = buildModelProcessor (rClass , androidSystemServices );
249- return modelProcessor .processToCodeModel (validatedModel );
250- }
251-
252- private MetaModel processAnnotationsToStringModel (AnnotationElements validatedModel , IRClass rClass , AndroidSystemServices androidSystemServices ) {
242+ private JCodeModel processAnnotations (AnnotationElements validatedModel , IRClass rClass , AndroidSystemServices androidSystemServices ) {
253243 ModelProcessor modelProcessor = buildModelProcessor (rClass , androidSystemServices );
254- return modelProcessor .processToStringModel (validatedModel );
244+ return modelProcessor .process (validatedModel );
255245 }
256246
257247 private ModelProcessor buildModelProcessor (IRClass rClass , AndroidSystemServices androidSystemServices ) {
@@ -278,12 +268,7 @@ private ModelProcessor buildModelProcessor(IRClass rClass, AndroidSystemServices
278268 return modelProcessor ;
279269 }
280270
281- private void generateStringModelSources (MetaModel model ) throws IOException {
282- StringModelGenerator modelGenerator = new StringModelGenerator (processingEnv .getFiler ());
283- modelGenerator .generate (model );
284- }
285-
286- private void generateCodeModelSources (JCodeModel model ) throws IOException {
271+ private void generateSources (JCodeModel model ) throws IOException {
287272 CodeModelGenerator modelGenerator = new CodeModelGenerator (processingEnv .getFiler ());
288273 modelGenerator .generate (model );
289274 }
0 commit comments