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

pack-priv final Class ContentHandlerNamespacePrefixAdapter

extends XMLFilterImpl
Class Inheritance
Imports
javax.xml.XMLConstants, org.xml.sax.Attributes, .SAXException, .SAXNotRecognizedException, .SAXNotSupportedException, .XMLReader, org.xml.sax.helpers.AttributesImpl, .XMLFilterImpl

XMLReader filter for supporting http://xml.org/sax/features/namespace-prefixes feature.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final AttributesImpl
private int
private static final String
private boolean
namespacePrefixes

True if http://xml.org/sax/features/namespace-prefixes is set to true.

private String[]
private static final String

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
getFeature(String name)

Overrides org.xml.sax.helpers.XMLFilterImpl.getFeature.

Implements org.xml.sax.XMLReader.getFeature.

Look up the value of a feature.

public void
setFeature(String name, boolean value)

Overrides org.xml.sax.helpers.XMLFilterImpl.setFeature.

Implements org.xml.sax.XMLReader.setFeature.

Set the value of a feature.

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

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

Implements org.xml.sax.ContentHandler.startElement.

Filter a start element event.

public void
startPrefixMapping(String prefix, String uri)

Overrides org.xml.sax.helpers.XMLFilterImpl.startPrefixMapping.

Implements org.xml.sax.ContentHandler.startPrefixMapping.

Filter a start Namespace prefix mapping event.

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

Field Detail

attsback to summary
private final AttributesImpl atts
lenback to summary
private int len
NAMESPACE_FEATUREback to summary
private static final String NAMESPACE_FEATURE
namespacePrefixesback to summary
private boolean namespacePrefixes

True if http://xml.org/sax/features/namespace-prefixes is set to true.

nsBindingback to summary
private String[] nsBinding
PREFIX_FEATUREback to summary
private static final String PREFIX_FEATURE

Constructor Detail

ContentHandlerNamespacePrefixAdapterback to summary
public ContentHandlerNamespacePrefixAdapter()
ContentHandlerNamespacePrefixAdapterback to summary
public ContentHandlerNamespacePrefixAdapter(XMLReader parent)

Method Detail

getFeatureback to summary
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException

Overrides org.xml.sax.helpers.XMLFilterImpl.getFeature.

Implements org.xml.sax.XMLReader.getFeature.

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

Look up the value of a feature.

This will always fail if the parent is null.

Annotations
@Override
Exceptions
SAXNotRecognizedException:
If the feature value can't be assigned or retrieved from the parent.
SAXNotSupportedException:
When the parent recognizes the feature name but cannot determine its value at this time.
setFeatureback to summary
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException

Overrides org.xml.sax.helpers.XMLFilterImpl.setFeature.

Implements org.xml.sax.XMLReader.setFeature.

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

Set the value of a feature.

This will always fail if the parent is null.

Annotations
@Override
Exceptions
SAXNotRecognizedException:
If the feature value can't be assigned or retrieved from the parent.
SAXNotSupportedException:
When the parent recognizes the feature name but cannot set the requested value.
startElementback to summary
public void startElement(String uri, 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.
startPrefixMappingback to summary
public void startPrefixMapping(String prefix, String uri) throws SAXException

Overrides org.xml.sax.helpers.XMLFilterImpl.startPrefixMapping.

Implements org.xml.sax.ContentHandler.startPrefixMapping.

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

Filter a start Namespace prefix mapping event.

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