public static XMLStreamException missingRequired(final XMLStreamReader reader, final Set<?> required) {
        final StringBuilder b = new StringBuilder();
        Iterator<?> iterator = required.iterator();
        while (iterator.hasNext()) {
            final Object o = iterator.next();
            b.append(o.toString());
            if (iterator.hasNext()) {
                b.append(", ");
            }
        }
        return new XMLStreamException("Missing required attribute(s): " + b, reader.getLocation());
    }
public static XMLStreamException missingRequired ( final XMLStreamReader reader , final Set < ? > required ) { final StringBuilder b = new StringBuilder ( ) ; Iterator < ? > iterator = required . iterator ( ) ; while ( iterator . hasNext ( ) ) { final Object o = iterator . next ( ) ; b . append ( o . toString ( ) ) ; if ( iterator . hasNext ( ) ) { b . append ( ", " ) ; } } return new XMLStreamException ( "Missing required attribute(s): " + b , reader . getLocation ( ) ) ; }
Get an exception reporting a missing, required XML attribute.
@param reader the stream reader
@param required a set of enums whose toString method returns the
attribute name
@return the exception