/** * Looks at whether the DefaultInstantiator resolving a valid constructor does not met this case: * - No constructor with @Inject annotation is defined * - NoArgs constructor is defined * - Instantiator ignores JAX-RS valid constructor with multiple params * * @param it injection target containing instantiator with resolved constructor. * @param clazz class which analyzed constructor belongs to. * @param <T> type of the analyzed class. * @return {@code true} if no-arg constructor was selected while multi-params constructor exists. */ private static <T> boolean isNoArgConstructorCase(BasicInjectionTarget<T> it, Class<T> clazz) { if (!(it instanceof NonProducibleInjectionTarget)) { Instantiator<T> instantiator = it.getInstantiator(); Constructor<T> constructor = instantiator.getConstructor(); return constructor.getParameterCount() == 0 && clazz.getConstructors().length > 1; } return false; }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }
@Override public Constructor<T> getConstructor() { return delegate().getConstructor(); } }