EventInvoker initInvoker = null;
boolean eagerInit = false;
EventInvoker destroyInvoker = null;
for (Field field : fields) {
ComponentName compName = field.getAnnotation(ComponentName.class);
if (compName != null) {
Injector injector = new FieldInjector(field, new SingletonObjectFactory(name));
injectors.add(injector);
}
org.osoa.sca.annotations.Context context = field.getAnnotation(org.osoa.sca.annotations.Context.class);
if (context != null) {
Injector injector = new FieldInjector(field, new SingletonObjectFactory(moduleComponentContext));
injectors.add(injector);
}
}
for (Method method : methods) {
// FIXME Java5
Init init = method.getAnnotation(Init.class);
if (init != null && initInvoker == null) {
initInvoker = new MethodEventInvoker(method);
eagerInit = init.eager();
continue;
}
Destroy destroy = method.getAnnotation(Destroy.class);
if (destroy != null && destroyInvoker == null) {
destroyInvoker = new MethodEventInvoker(method);
continue;
}
ComponentName compName = method.getAnnotation(ComponentName.class);
if (compName != null) {
Injector injector = new MethodInjector(method, new SingletonObjectFactory(name));
injectors.add(injector);
}
org.osoa.sca.annotations.Context context = method.getAnnotation(org.osoa.sca.annotations.Context.class);