// check if all required permission elements have been processed.
if (!requiredElements.isEmpty())
throw missingRequiredElement(reader, requiredElements);
// build a permission and add it to the list.
PermissionFactory factory = new ModularPermissionFactory(loader, identifier, permissionClass,
permissionName, permissionActions);
return factory;
}
case XMLStreamConstants.START_ELEMENT: {
Element element = Element.forName(reader.getLocalName());