private static Constructor<?> findFactoryConstructor(Class<?> targetType) { List<Constructor<?>> constructors = findConstructors(targetType, new IsFactoryConstructor(targetType)); if (constructors.size() == 1) { return constructors.get(0); } return null; }