class DefaultAnnotationParser extends AnnotationParser
This class doesn't have any state. So it should be used as a singleton.
| Modifier and Type | Field and Description |
|---|---|
static AnnotationParser |
theInstance |
| Modifier | Constructor and Description |
|---|---|
private |
DefaultAnnotationParser() |
| Modifier and Type | Method and Description |
|---|---|
org.xml.sax.ContentHandler |
getContentHandler(AnnotationContext contest,
java.lang.String elementName,
org.xml.sax.ErrorHandler errorHandler,
org.xml.sax.EntityResolver entityResolver)
Called every time a new <xs:annotation> element
is found.
|
java.lang.Object |
getResult(java.lang.Object existing)
Once the SAX events are fed to the ContentHandler,
this method will be called to retrieve the parsed result.
|
public static final AnnotationParser theInstance
public org.xml.sax.ContentHandler getContentHandler(AnnotationContext contest, java.lang.String elementName, org.xml.sax.ErrorHandler errorHandler, org.xml.sax.EntityResolver entityResolver)
AnnotationParsergetContentHandler in class AnnotationParsercontest - indicates the schema component that owns this annotation.
Always non-null.elementName - local name of the element that contains <xs:annotation>.
(e.g., "element", "attribute", ... )errorHandler - The error handler that the client application specifies.
The returned content handler can send its errors to this
object.entityResolver - The entity resolver that is currently in use. Again,
The returned content handler can use this object
if it needs to resolve entities.public java.lang.Object getResult(java.lang.Object existing)
AnnotationParsergetResult in class AnnotationParserexisting - An annotation object which was returned from another
AnnotationParser before. Sometimes, one schema component
can have multiple <:xs:annotation> elements and
this parameter is used to merge all those annotations
together. If there is no existing object, null will be
passed.