public Object newInstance() throws InstantiationException, IllegalAccessException, InvocationTargetException { return instantiator.newInstance(); }
public Object newInstance() throws InstantiationException, IllegalAccessException, InvocationTargetException { return instantiator.newInstance(); }
public Object newInstance() throws InstantiationException, IllegalAccessException, InvocationTargetException { return instantiator.newInstance(); }
@SuppressWarnings("unchecked") public <T> T newInstance(Class<T> cls) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException { ClassDescriptor desc = descriptorCache.get(cls); if (desc != null) return (T)desc.newInstance(); try { Constructor<T> constructor = cls.getConstructor(); return constructor.newInstance(); } catch (NoSuchMethodException e) { return (T)instanceFactory.newInstantiator(cls).newInstance(); } }
@SuppressWarnings("unchecked") public <T> T newInstance(Class<T> cls) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException { ClassDescriptor desc = descriptorCache.get(cls); if (desc != null) return (T)desc.newInstance(); try { Constructor<T> constructor = cls.getConstructor(); return constructor.newInstance(); } catch (NoSuchMethodException e) { return (T)instanceFactory.newInstantiator(cls).newInstance(); } }
@SuppressWarnings("unchecked") public <T> T newInstance(Class<T> cls) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException { ClassDescriptor desc = descriptorCache.get(cls); if (desc != null) return (T)desc.newInstance(); try { Constructor<T> constructor = cls.getConstructor(); return constructor.newInstance(); } catch (NoSuchMethodException e) { return (T)instanceFactory.newInstantiator(cls).newInstance(); } }