@Before public void setup() { TransfuseTestInjector.inject(this); methodInterceptorASTType = astClassFactory.buildASTClassType(AOPAnnotationMethodInterceptor.class); aopAnnotationASTType = astClassFactory.buildASTClassType(AOPAnnotation.class); proxyTargetASTType = astClassFactory.buildASTClassType(AOPProxyTarget.class); proxyTargetInjectionNode = injectionPointFactory.buildInjectionNode( proxyTargetASTType, simpleAnalysisContextFactory.buildContext()); }
private ASTMethod getASTMethod(String methodName, Class... args) { try { return astClassFactory.getMethod( android.app.Application.class.getDeclaredMethod(methodName, args)); } catch (NoSuchMethodException e) { throw new TransfuseAnalysisException( "NoSuchMethodException while trying to reference method " + methodName, e); } }