private boolean isNotServerProvider(Class<?> clazz) { final ConstrainedTo ct = clazz.getAnnotation(ConstrainedTo.class); if (ct != null && ct.value() != RuntimeType.SERVER) { if (!FAIL_ON_CONSTRAINED_TO) { LOGGER.warning(clazz + " is not a SERVER provider, ignoring"); return true; } throw new IllegalArgumentException(clazz + " is not a SERVER provider"); } return false; }