public Instantiator newInstantiator(Class<?> cls) throws IllegalAccessException, InvocationTargetException { Constructor<?> constructor = (Constructor<?>)newConstructorForSerialization.invoke(reflectionFactory, cls, objectConstructor); constructor.setAccessible(true); return new ConstructorInstantiator(constructor); } }
public Instantiator newInstantiator(Class<?> cls) throws IllegalAccessException, InvocationTargetException { Constructor<?> constructor = (Constructor<?>)newConstructorForSerialization.invoke(reflectionFactory, cls, objectConstructor); constructor.setAccessible(true); return new ConstructorInstantiator(constructor); } }
public Instantiator newInstantiator(Class<?> cls) throws IllegalAccessException, InvocationTargetException { Constructor<?> constructor = (Constructor<?>)newConstructorForSerialization.invoke(reflectionFactory, cls, objectConstructor); constructor.setAccessible(true); return new ConstructorInstantiator(constructor); } }
private static Instantiator getInstantiator(Reflection reflection, Class<?> cls) { try { return new ConstructorInstantiator(cls.getConstructor()); } catch (NoSuchMethodException e) { // Fallback... } try { return reflection.instanceFactory.newInstantiator(cls); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } }
private static Instantiator getInstantiator(Reflection reflection, Class<?> cls) { try { return new ConstructorInstantiator(cls.getConstructor()); } catch (NoSuchMethodException e) { // Fallback... } try { return reflection.instanceFactory.newInstantiator(cls); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } }
private static Instantiator getInstantiator(Reflection reflection, Class<?> cls) { try { return new ConstructorInstantiator(cls.getConstructor()); } catch (NoSuchMethodException e) { // Fallback... } try { return reflection.instanceFactory.newInstantiator(cls); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } }