I have the following scenario shown below. When I run the class in a debugger the @Inject
never hits for myInjectMethod
. If I move the myInjectMethod
to MyService
it works. Why is this happening?
@Singleton
@Creatable
public class MyService extends MyBaseService {
@Inject
public MyService(final IEclipseContext context) {
context.set(MyService.class.getName(), this);
}
}
abstract class MyBaseService {
@Inject
public void myInjectMethod(@Preference(nodePath = "MyPreferenceName",
value = "MyPreferenceValue") final boolean isSomething) {
// Why do I never get here when running the debugger?
System.out.println("Hello");
}
}