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

public final Class ExtensionBindingChecker

extends AbstractExtensionBindingChecker
Class Inheritance
Imports
java.util.StringTokenizer, com.sun.tools.xjc.Options, org.xml.sax.Attributes, .ErrorHandler, .SAXException

This filter checks jaxb:extensionBindingPrefix and pass/filter extension bindings.

This filter also remembers enabled extension namespaces and filters out any extension namespaces that doesn't belong to those. The net effect is that disabled customizations will never pass through this filter.

Note that we can't just filter out all foreign namespaces, as we need to use user-defined tags in documentations to generate javadoc.

The class needs to know the list of extension binding namespaces that the RI recognizes. To add new URI, modify the isSupportedExtension method.

Author
Kohsuke Kawaguchi ([email protected])

Field Summary

Modifier and TypeField and Description
private int
count

Number of the elements encountered.

Inherited from com.sun.tools.xjc.reader.AbstractExtensionBindingChecker:
allowExtensionsenabledExtensionsnsSupportschemaLanguage

Constructor Summary

AccessConstructor and Description
public
ExtensionBindingChecker(String schemaLanguage, Options options, ErrorHandler handler)

Method Summary

Modifier and TypeMethod and Description
private boolean
needsToBePruned(String uri)

Returns true if the elements with the given namespace URI should be blocked by this filter.

public void
public void
startElement(String namespaceURI, String localName, String qName, Attributes atts)

Overrides com.sun.tools.xjc.util.SubtreeCutter.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Filter a start element event.

Inherited from com.sun.tools.xjc.reader.AbstractExtensionBindingChecker:
checkAndEnableendPrefixMappingerrorisRecognizableExtensionisSupportedExtensionsetDocumentLocatorstartPrefixMappingverifyTagNamewarning

Field Detail

countback to summary
private int count

Number of the elements encountered. Used to detect the root element.

Constructor Detail

ExtensionBindingCheckerback to summary
public ExtensionBindingChecker(String schemaLanguage, Options options, ErrorHandler handler)

Method Detail

needsToBePrunedback to summary
private boolean needsToBePruned(String uri)

Returns true if the elements with the given namespace URI should be blocked by this filter.

startDocumentback to summary
public void startDocument() throws SAXException

Overrides com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

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

Filter a start document event.

Annotations
@Override
Exceptions
SAXException:
The client may throw an exception during processing.
startElementback to summary
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException

Overrides com.sun.tools.xjc.util.SubtreeCutter.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.