private static Class<? extends IConstraintValidator> getValidatorClass(final Constraint constraint, final Class requiredType) {
		for (Class<? extends IConstraintValidator> clazz : constraint.value()) {
			ParameterizedType superClass;

			//TODO: make this universal, not just plainly covering the cases in this library
			if (clazz.getGenericInterfaces().length > 0) {
				superClass = (ParameterizedType) clazz.getGenericInterfaces()[0];
			}	else {
				superClass = (ParameterizedType) clazz.getGenericSuperclass();
			}
			Class acceptedType = (Class) superClass.getActualTypeArguments()[INDEX_ACCEPTED_TYPE];
			if (acceptedType.isAssignableFrom(getBoxWrapperIfPrimitive(requiredType))) {
				return clazz;
			}
		}
		return null;
	}