|
15 | 15 | */ |
16 | 16 | package org.androidannotations.processing; |
17 | 17 |
|
18 | | -import static org.androidannotations.helper.ModelConstants.GENERATION_SUFFIX; |
19 | 18 | import static com.sun.codemodel.JExpr.FALSE; |
20 | 19 | import static com.sun.codemodel.JExpr._new; |
21 | 20 | import static com.sun.codemodel.JExpr._null; |
|
25 | 24 | import static com.sun.codemodel.JMod.PRIVATE; |
26 | 25 | import static com.sun.codemodel.JMod.PUBLIC; |
27 | 26 | import static com.sun.codemodel.JMod.STATIC; |
| 27 | +import static org.androidannotations.helper.ModelConstants.GENERATION_SUFFIX; |
28 | 28 |
|
29 | 29 | import java.lang.annotation.Annotation; |
30 | 30 |
|
|
34 | 34 |
|
35 | 35 | import org.androidannotations.annotations.EFragment; |
36 | 36 | import org.androidannotations.helper.IdAnnotationHelper; |
| 37 | +import org.androidannotations.processing.EBeanHolder.GeneratedClassType; |
37 | 38 | import org.androidannotations.processing.EBeansHolder.Classes; |
38 | 39 | import org.androidannotations.rclass.IRClass; |
39 | 40 | import org.androidannotations.rclass.IRClass.Res; |
| 41 | + |
40 | 42 | import com.sun.codemodel.ClassType; |
41 | 43 | import com.sun.codemodel.JBlock; |
42 | 44 | import com.sun.codemodel.JClass; |
@@ -72,7 +74,7 @@ public void process(Element element, JCodeModel codeModel, EBeansHolder eBeansHo |
72 | 74 |
|
73 | 75 | JDefinedClass generatedClass = codeModel._class(PUBLIC | FINAL, generatedBeanQualifiedName, ClassType.CLASS); |
74 | 76 |
|
75 | | - EBeanHolder holder = eBeansHolder.create(element, getTarget(), generatedClass); |
| 77 | + EBeanHolder holder = eBeansHolder.create(element, getTarget(), generatedClass, GeneratedClassType.FRAGMENT); |
76 | 78 |
|
77 | 79 | JClass eBeanClass = codeModel.directClass(beanQualifiedName); |
78 | 80 |
|
@@ -142,11 +144,10 @@ public void process(Element element, JCodeModel codeModel, EBeansHolder eBeansHo |
142 | 144 | JBlock onViewCreatedBody = onViewCreated.body(); |
143 | 145 |
|
144 | 146 | onViewCreatedBody.invoke(_super(), onViewCreated).arg(view).arg(savedInstanceState); |
145 | | - |
| 147 | + |
146 | 148 | onViewCreatedBody.invoke(holder.afterSetContentView); |
147 | 149 | } |
148 | 150 |
|
149 | | - |
150 | 151 | { |
151 | 152 | // findViewById |
152 | 153 |
|
|
0 commit comments