/** Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. * If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality. * @param type the event type * @param namespaceURI the uri of the event, may be null * @param localName the localName of the event, may be null * @throws XMLStreamException if the required values are not matched. */ public final void require(int type, String namespaceURI, String localName) throws XMLStreamException { if( type != _eventType) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.eventTypeNotMatch", new Object[]{getEventTypeString(type)})); if( namespaceURI != null && !namespaceURI.equals(getNamespaceURI()) ) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.namespaceURINotMatch", new Object[]{namespaceURI})); if(localName != null && !localName.equals(getLocalName())) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.localNameNotMatch", new Object[]{localName})); }
/** Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. * If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality. * @param type the event type * @param namespaceURI the uri of the event, may be null * @param localName the localName of the event, may be null * @throws XMLStreamException if the required values are not matched. */ public final void require(int type, String namespaceURI, String localName) throws XMLStreamException { if( type != _eventType) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.eventTypeNotMatch", new Object[]{getEventTypeString(type)})); if( namespaceURI != null && !namespaceURI.equals(getNamespaceURI()) ) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.namespaceURINotMatch", new Object[]{namespaceURI})); if(localName != null && !localName.equals(getLocalName())) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.localNameNotMatch", new Object[]{localName})); }
/** Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. * If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality. * @param type the event type * @param namespaceURI the uri of the event, may be null * @param localName the localName of the event, may be null * @throws XMLStreamException if the required values are not matched. */ public final void require(int type, String namespaceURI, String localName) throws XMLStreamException { if( type != _eventType) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.eventTypeNotMatch", new Object[]{getEventTypeString(type)})); if( namespaceURI != null && !namespaceURI.equals(getNamespaceURI()) ) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.namespaceURINotMatch", new Object[]{namespaceURI})); if(localName != null && !localName.equals(getLocalName())) throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.localNameNotMatch", new Object[]{localName})); return; }
} else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
} else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
} else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());