@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 <T> Method getPreDestroyMethod(Class<T> clazz) throws MultiException { Collector collector = new Collector(); Method retVal = Utilities.findPreDestroy(clazz, locator, collector); collector.throwIfErrors(); return retVal; }
@SuppressWarnings("unchecked") @Override public <T> Constructor<T> getConstructor(Class<T> clazz) throws MultiException, NoSuchMethodException { Collector collector = new Collector(); Constructor<T> retVal = (Constructor<T>) Utilities.findProducerConstructor(clazz, locator, collector); try { collector.throwIfErrors(); } catch (MultiException me) { for (Throwable th : me.getErrors()) { if (th instanceof NoSuchMethodException) { throw (NoSuchMethodException) th; } } throw me; } return retVal; }