|
37 | 37 | import javax.lang.model.type.WildcardType; |
38 | 38 |
|
39 | 39 | import org.androidannotations.processing.EBeanHolder; |
40 | | -import org.androidannotations.processing.EBeansHolder.Classes; |
41 | 40 |
|
42 | 41 | import com.sun.codemodel.JBlock; |
43 | | -import com.sun.codemodel.JCatchBlock; |
44 | 42 | import com.sun.codemodel.JClass; |
45 | 43 | import com.sun.codemodel.JClassAlreadyExistsException; |
46 | 44 | import com.sun.codemodel.JCodeModel; |
|
54 | 52 | import com.sun.codemodel.JMethod; |
55 | 53 | import com.sun.codemodel.JMod; |
56 | 54 | import com.sun.codemodel.JStatement; |
57 | | -import com.sun.codemodel.JTryBlock; |
58 | 55 | import com.sun.codemodel.JType; |
59 | 56 | import com.sun.codemodel.JVar; |
60 | 57 |
|
@@ -228,20 +225,6 @@ public String getIdStringFromIdFieldRef(JFieldRef idRef) { |
228 | 225 | throw new IllegalStateException("Unable to extract target name from JFieldRef"); |
229 | 226 | } |
230 | 227 |
|
231 | | - public JTryBlock surroundWithTryCatch(EBeanHolder holder, JBlock block, JBlock content, String exceptionMessage) { |
232 | | - Classes classes = holder.classes(); |
233 | | - JTryBlock tryBlock = block._try(); |
234 | | - tryBlock.body().add(content); |
235 | | - JCatchBlock catchBlock = tryBlock._catch(classes.RUNTIME_EXCEPTION); |
236 | | - JVar exceptionParam = catchBlock.param("e"); |
237 | | - JInvocation errorInvoke = classes.LOG.staticInvoke("e"); |
238 | | - errorInvoke.arg(holder.generatedClass.name()); |
239 | | - errorInvoke.arg(exceptionMessage); |
240 | | - errorInvoke.arg(exceptionParam); |
241 | | - catchBlock.body().add(errorInvoke); |
242 | | - return tryBlock; |
243 | | - } |
244 | | - |
245 | 228 | public JDefinedClass createDelegatingAnonymousRunnableClass(EBeanHolder holder, JMethod delegatedMethod) { |
246 | 229 |
|
247 | 230 | JCodeModel codeModel = holder.codeModel(); |
|
0 commit comments