/** * @return Returns the list of groups this constraint is part of. This might include the default group even when * it is not explicitly specified, but part of the redefined default group list of the hosting bean. */ public final Set<Class<?>> getGroupList() { return constraintDescriptor.getGroups(); }
/** * @return Returns the list of groups this constraint is part of. This might include the default group even when * it is not explicitly specified, but part of the redefined default group list of the hosting bean. */ public final Set<Class<?>> getGroupList() { return constraintTree.getDescriptor().getGroups(); }
private void addMatchingDescriptorsForGroup(Class<?> group, Set<ConstraintDescriptor<?>> matchingDescriptors) { for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) { if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() ) && descriptor.getGroups().contains( group ) ) { matchingDescriptors.add( descriptor ); } } }
private void addMatchingDescriptorsForGroup(Class<?> group, Set<ConstraintDescriptor<?>> matchingDescriptors) { for ( ConstraintDescriptorImpl<?> descriptor : constraintDescriptors ) { if ( definedInSet.contains( descriptor.getDefinedOn() ) && elementTypes.contains( descriptor.getElementType() ) && descriptor.getGroups().contains( group ) ) { matchingDescriptors.add( descriptor ); } } }
/** * @param constraintDescriptor The constraint descriptor for this constraint * @param location meta data about constraint placement * @param valueExtractorDescriptors the potential {@link ValueExtractor}s used to extract the value to validate * @param validatedValueType the type of the validated element */ MetaConstraint(ConstraintDescriptorImpl<A> constraintDescriptor, ConstraintLocation location, List<ContainerClassTypeParameterAndExtractor> valueExtractionPath, Type validatedValueType) { this.constraintTree = ConstraintTree.of( constraintDescriptor, validatedValueType ); this.location = location; this.valueExtractionPath = getValueExtractionPath( valueExtractionPath ); this.hashCode = buildHashCode( constraintDescriptor, location ); this.isDefinedForOneGroupOnly = constraintDescriptor.getGroups().size() <= 1; }