@Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws IllegalArgumentException { AutoActiveDescriptor<T> ad = Utilities.createAutoDescriptor(rawClass, locator); checkReifiedDescriptor(ad); ActiveDescriptor<T> retVal = addActiveDescriptor(ad, false); ad.resetSelfDescriptor(retVal); return retVal; }
@Override public <T> Method getPostConstructMethod(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Method retVal = Utilities.findPostConstruct(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public <T> Set<Field> getFields(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Set<Field> retVal = Utilities.findInitializerFields(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public <T> Method getPreDestroyMethod(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Method retVal = Utilities.findPreDestroy(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public <T> Set<Method> getInitializerMethods(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Set<Method> retVal = Utilities.findInitializerMethods(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
/** * Returns an injection resolver for the injectee * * @param locator The locator to use when finding the resolver * @param injectee Injectee from which the annotation should be extracted * @return Injection resolver used to resolve the injection for the injectee * @throws IllegalStateException If we could not find a valid resolver */ public InjectionResolver<?> getInjectionResolver( ServiceLocatorImpl locator, SystemInjecteeImpl injectee) throws IllegalStateException { return getInjectionResolver(locator, injectee.getParent(), injectee.getPosition()); }
@Override public void inject(Object injectMe, String strategy) { checkState(); Utilities.justInject(injectMe, this, strategy); }
@Override public <T> T create(Class<T> createMe, String strategy) { checkState(); return Utilities.justCreate(createMe, this, strategy); }
private void reupInstanceListenersHandlers(Collection<SystemDescriptor<?>> checkList) { List<InstanceLifecycleListener> allLifecycleListeners = protectedGetAllServices(InstanceLifecycleListener.class); for (SystemDescriptor<?> descriptor : checkList) { descriptor.reupInstanceListeners(allLifecycleListeners); } }
@Override public Object assistedInject(Object injectMe, Method method, ServiceHandle<?> root, MethodParameter... params) { checkState(); return Utilities.justAssistedInject(injectMe, method, this, root, params); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws IllegalArgumentException { AutoActiveDescriptor<T> ad = Utilities.createAutoDescriptor(rawClass, locator); checkReifiedDescriptor(ad); ActiveDescriptor<T> retVal = addActiveDescriptor(ad, false); ad.resetSelfDescriptor(retVal); return retVal; }
@Override public <T> Set<Field> getFields(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Set<Field> retVal = Utilities.findInitializerFields(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public <T> Method getPreDestroyMethod(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Method retVal = Utilities.findPreDestroy(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public <T> Set<Method> getInitializerMethods(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Set<Method> retVal = Utilities.findInitializerMethods(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public void inject(Object injectMe, String strategy) { checkState(); Utilities.justInject(injectMe, this, strategy); }
@Override public <T> T create(Class<T> createMe, String strategy) { checkState(); return Utilities.justCreate(createMe, this, strategy); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws IllegalArgumentException { AutoActiveDescriptor<T> ad = Utilities.createAutoDescriptor(rawClass, locator); checkReifiedDescriptor(ad); ActiveDescriptor<T> retVal = addActiveDescriptor(ad, false); ad.resetSelfDescriptor(retVal); return retVal; }
@Override public <T> Set<Field> getFields(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Set<Field> retVal = Utilities.findInitializerFields(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@Override public void inject(Object injectMe, String strategy) { checkState(); Utilities.justInject(injectMe, this, strategy); }
@Override public <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws IllegalArgumentException { AutoActiveDescriptor<T> ad = Utilities.createAutoDescriptor(rawClass, locator); checkReifiedDescriptor(ad); ActiveDescriptor<T> retVal = addActiveDescriptor(ad, false); ad.resetSelfDescriptor(retVal); return retVal; }