Ejemplo n.º 1
0
 /**
  * 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
  */
 public static XMLStreamException missingRequired(
     final XMLExtendedStreamReader reader, final String... required) {
   final StringBuilder b = new StringBuilder();
   for (int i = 0; i < required.length; i++) {
     final String o = required[i];
     b.append(o);
     if (required.length > i + 1) {
       b.append(", ");
     }
   }
   return ControllerLogger.ROOT_LOGGER.missingRequiredAttributes(b, reader.getLocation());
 }
Ejemplo n.º 2
0
 /**
  * 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
  */
 public static XMLStreamException missingRequired(
     final XMLExtendedStreamReader reader, final Set<?> required) {
   return ControllerLogger.ROOT_LOGGER.missingRequiredAttributes(
       asStringList(required), reader.getLocation());
 }