* @param mappingStreams the input stream for the xml configuration
*/
public XmlMetaDataProvider(ConstraintHelper constraintHelper, Set<InputStream> mappingStreams) {
super( constraintHelper );
XmlMappingParser mappingParser = new XmlMappingParser( constraintHelper );
mappingParser.parse( mappingStreams );
for ( Class<?> clazz : mappingParser.getXmlConfiguredClasses() ) {
Map<ConstraintLocation, Set<MetaConstraint<?>>> constraintsByLocation = partition(
mappingParser.getConstraintsForClass( clazz ), byLocation()
);
Set<ConstraintLocation> cascades = getCascades( mappingParser, clazz );
Set<ConstrainedElement> constrainedElements = getConstrainedElements( constraintsByLocation, cascades );
addBeanConfiguration(
clazz,
createBeanConfiguration(
ConfigurationSource.XML,
clazz,
constrainedElements,
mappingParser.getDefaultSequenceForClass( clazz ),
null
)
);
}
annotationProcessingOptions = mappingParser.getAnnotationProcessingOptions();
}