Top Description Fields Constructors Methods
com.sun.tools.xjc.reader.internalizer

public Class VersionChecker

extends XMLFilterImpl
Class Inheritance
Imports
java.util.List, .Set, .HashSet, com.sun.tools.xjc.reader.Const, org.xml.sax.Attributes, .ContentHandler, .EntityResolver, .ErrorHandler, .Locator, .SAXException, .SAXParseException, .XMLReader, org.xml.sax.helpers.LocatorImpl, .XMLFilterImpl

Checks the jaxb:version attribute on a XML Schema document. jaxb:version is optional if no binding customization is used, but if present, its value must be "3.0".
Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private Locator
private Locator
rootTagStart

Stores the location of the start tag of the root tag.

private boolean
seenBindings

Will be set to true once we hit a binding declaration.

private boolean
seenRoot

Will be set to true once we hit the root element.

private String
version

We store the value of the version attribute in this variable when we hit the root element.

private static final Set<String>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
startElement(String namespaceURI, String localName, String qName, Attributes atts)

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Filter a start element event.

Inherited from org.xml.sax.helpers.XMLFilterImpl:
charactersendElementendPrefixMappingerrorfatalErrorgetContentHandlergetDTDHandlergetEntityResolvergetErrorHandlergetFeaturegetParentgetPropertyignorableWhitespacenotationDeclparseparseprocessingInstructionresolveEntitysetContentHandlersetDTDHandlersetEntityResolversetErrorHandlersetFeaturesetParentsetPropertyskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

locatorback to summary
private Locator locator

Hides org.xml.sax.helpers.XMLFilterImpl.locator.

rootTagStartback to summary
private Locator rootTagStart

Stores the location of the start tag of the root tag.

seenBindingsback to summary
private boolean seenBindings

Will be set to true once we hit a binding declaration.

seenRootback to summary
private boolean seenRoot

Will be set to true once we hit the root element.

versionback to summary
private String version

We store the value of the version attribute in this variable when we hit the root element.

VERSIONSback to summary
private static final Set<String> VERSIONS

Constructor Detail

VersionCheckerback to summary
public VersionChecker(XMLReader parent)
VersionCheckerback to summary
public VersionChecker(ContentHandler handler, ErrorHandler eh, EntityResolver er)

Method Detail

endDocumentback to summary
public void endDocument() throws SAXException

Overrides org.xml.sax.helpers.XMLFilterImpl.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Doc from org.xml.sax.helpers.XMLFilterImpl.endDocument.

Filter an end document event.

Annotations
@Override
Exceptions
SAXException:
The client may throw an exception during processing.
setDocumentLocatorback to summary
public void setDocumentLocator(Locator locator)

Overrides org.xml.sax.helpers.XMLFilterImpl.setDocumentLocator.

Implements org.xml.sax.ContentHandler.setDocumentLocator.

Doc from org.xml.sax.helpers.XMLFilterImpl.setDocumentLocator.

Filter a new document locator event.

Annotations
@Override
startElementback to summary
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.XMLFilterImpl.startElement.

Filter a start element event.

Annotations
@Override
Exceptions
SAXException:
The client may throw an exception during processing.