質問

Documentation on this is hard to come by. This is an advance use of Roboguice involving libraries.

Say I have a class in my base library called MyRoboActivity which extends from RoboActivity

@Inject
HumanModel humanModel;

In one project for men just say, I would like the above to be populated with this version

@Singleton
public class MaleModel extends HumanModel {...}

In another project for women, I would the above to be injected with this version

@Singleton
public class FemaleModel extends HumanModel {...}

What syntax do I need in each male and female projects to make this work?

役に立ちましたか?

解決

I've figured it out using Roboguice Modules - http://knowledge.lapasa.net/?p=986

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top