private Set<ConstraintDescriptorImpl<?>> getClassLevelConstraintsAsDescriptors() {
    Set<MetaConstraint<?>> classLevelConstraints = getClassLevelConstraints(allMetaConstraints);

    Set<ConstraintDescriptorImpl<?>> theValue = newHashSet();

    for (MetaConstraint<?> metaConstraint : classLevelConstraints) {
      theValue.add(metaConstraint.getDescriptor());
    }

    return theValue;
  }
  private Set<MetaConstraint<?>> getDirectConstraints() {
    Set<MetaConstraint<?>> constraints = newHashSet();

    Set<Class<?>> classAndInterfaces = newHashSet();
    classAndInterfaces.add(beanClass);
    classAndInterfaces.addAll(ClassHierarchyHelper.getDirectlyImplementedInterfaces(beanClass));

    for (Class<?> clazz : classAndInterfaces) {
      for (MetaConstraint<?> metaConstraint : allMetaConstraints) {
        if (metaConstraint.getLocation().getDeclaringClass().equals(clazz)) {
          constraints.add(metaConstraint);
        }
      }
    }

    return Collections.unmodifiableSet(constraints);
  }