Dependency injection PagerAdapter和所有子类中的Android注释注入

Dependency injection PagerAdapter和所有子类中的Android注释注入,dependency-injection,annotations,ebean,android-annotations,Dependency Injection,Annotations,Ebean,Android Annotations,我正在我的项目中实现“Android注释”。我想用@EBean将引用注入到FragmentPagerAdapter类中,但是@EBean只需要一个构造函数,最多一个context类型的参数 但正如您所知,PagerAdapter及其子类有一个构造函数,其中FragmentManager参数作为输入。 生成时,会出现以下错误: Error:(23, 1) error: org.androidannotations.annotations.EBean annotated element should

我正在我的项目中实现“Android注释”。我想用@EBean将引用注入到FragmentPagerAdapter类中,但是@EBean只需要一个构造函数,最多一个context类型的参数

但正如您所知,PagerAdapter及其子类有一个构造函数,其中FragmentManager参数作为输入。 生成时,会出现以下错误:

Error:(23, 1) error: org.androidannotations.annotations.EBean annotated element should have a constructor with one parameter max, of type android.content.Context
如何在这个类中注入?
(我需要注入,因为我使用异步和bean注释)

不幸的是,由于
super
构造函数,无法用
@EBean
标记
FragmentPagerAdapter

谢谢您的回答,我可以请你为它提出替代解决方案/lib/hack吗?我看到的唯一解决办法是用
@EBean
包装
FragmentPagerAdapter
,在那里你可以注入任何东西,然后手动设置
FragmentPagerAdapter
对象。但这将是相当丑陋的,因为您必须使用回调。