public class ForwardingXMLHandler extends XMLHandler
XMLHandler will forward all calls to its delegate.XMLHandler.ManyReference, XMLHandler.MyEObjectStack, XMLHandler.MyStack<E>, XMLHandler.SingleReference| Modifier and Type | Field and Description |
|---|---|
protected XMLHandler |
delegate
The delegate to which we'll forward all calls.
|
anySimpleType, anyType, ARRAY_SIZE, attribs, capacity, contextFeature, DEBUG_DEMANDED_PACKAGES, deferIDREFResolution, deferredExtent, disableNotify, DOCUMENT_ROOT_TYPE, documentRoot, ecoreBuilder, elements, eObjectToExtensionMap, ERROR_TYPE, extendedMetaData, extent, externalURIToLocations, featuresToKinds, forwardManyReferences, forwardSingleReferences, helper, hrefAttribute, idAttribute, identifiers, isIDREF, isNamespaceAware, isRoot, isSimpleFeature, laxWildcardProcessing, locator, missingPackageHandler, mixedTargets, needsPushContext, NIL_ATTRIB, NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB, notFeatures, OBJECT_TYPE, objects, oldStyleProxyURIs, packageRegistry, positions, prefixesToFactories, processAnyXML, processSchemaLocations, recordAnyTypeNSDecls, recordUnknownFeature, REFERENCE_THRESHOLD, resolve, resourceEntityHandler, resourceSet, resourceURI, sameDocumentProxies, SCHEMA_LOCATION_ATTRIB, suppressDocumentRoot, text, TYPE_ATTRIB, types, UNKNOWN_FEATURE_TYPE, uriHandler, urisToLocations, useConfigurationCache, usedNullNamespacePackage, useNewMethods, usePackageNsURIAsLocation, xmlMap, xmlResource, xmlSchemaTypePackage| Constructor and Description |
|---|
ForwardingXMLHandler(XMLHandler delegate,
XMLResource xmlResource,
XMLHelper helper,
Map<?,?> options)
Creates this forwarding handler given its delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] ch,
int start,
int length) |
protected XMLHandler |
delegate()
Returns the delegate instance that methods are forwarded to.
|
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(String uri,
String localName,
String name) |
void |
endEntity(String name) |
void |
endPrefixMapping(String prefix) |
boolean |
equals(Object obj) |
void |
error(SAXParseException e) |
void |
error(XMIException e) |
void |
fatalError(SAXParseException e) |
void |
fatalError(XMIException e) |
protected String |
getXSIType() |
protected void |
handleObjectAttribs(EObject obj) |
int |
hashCode() |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
notationDecl(String name,
String publicId,
String systemId) |
void |
prepare(XMLResource resource,
XMLHelper xmlHelper,
Map<?,?> options) |
void |
processingInstruction(String target,
String data) |
protected static Object |
reflectiveCall(String key,
Object target,
String methodName,
Object... params)
Calls a given method through reflection after setting it
accessible. |
void |
reset() |
InputSource |
resolveEntity(String publicId,
String systemId) |
void |
setDocumentLocator(Locator locator) |
protected static void |
setField(String fieldName,
Object target,
Object value)
Sets the given field through reflection after setting it
accessible. |
void |
skippedEntity(String name) |
void |
startCDATA() |
void |
startDocument() |
void |
startDTD(String name,
String publicId,
String systemId) |
void |
startElement(String uri,
String localName,
String name) |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
void |
startEntity(String name) |
void |
startPrefixMapping(String prefix,
String uri) |
String |
toString() |
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName) |
void |
warning(SAXParseException e) |
void |
warning(XMIException e) |
createDocumentRoot, createEcoreBuilder, createObject, createObject, createObjectByType, createObjectFromFactory, createObjectFromFeatureType, createObjectFromTypeName, createTopObject, getColumnNumber, getExtension, getFactoryForPrefix, getFeature, getFeature, getLineNumber, getLocation, getPackageForURI, getURIConverter, getXMLEncoding, growArrays, handleCDATA, handleComment, handleFeature, handleForwardReferences, handleForwardReferences, handleMissingPackage, handleMixedText, handleNamespaceAttribs, handleProcessingInstruction, handleProxy, handleSchemaLocation, handleTopLocations, handleUnknownFeature, handleXMLNSAttribute, handleXSINoNamespaceSchemaLocation, handleXSISchemaLocation, isError, isNull, isTextFeatureValue, processElement, processObject, processSchemaLocations, processTopObject, recordHeaderInformation, recordNamespacesSchemaLocations, recordUnknownFeature, reportUnknownFeature, setAttributes, setAttribValue, setExtendedMetaDataOption, setFeatureValue, setFeatureValue, setFeatureValues, setLocator, setValueFromId, toXMIException, validateCreateObjectFromFactory, validateCreateObjectFromFactory, validateCreateObjectFromFactoryprotected final XMLHandler delegate
public ForwardingXMLHandler(XMLHandler delegate, XMLResource xmlResource, XMLHelper helper, Map<?,?> options)
delegate - Our delegate XMLHandler.xmlResource - The resource we'll be loading. Mandatory for the super-constructor, but we'll forward all
calls to delegate anyway.helper - The xml helper to use. Mandatory for the super-constructor, but we'll forward all calls to
delegate anyway.options - The load options that were specified. Mandatory for the super-constructor, but we'll forward
all calls to delegate anyway.protected XMLHandler delegate()
public void endDocument()
endDocument in interface ContentHandlerendDocument in class XMLHandlerXMLHandler.endDocument()public void characters(char[] ch,
int start,
int length)
characters in interface ContentHandlercharacters in class XMLHandlerXMLHandler.characters(char[], int, int)public void comment(char[] ch,
int start,
int length)
comment in interface LexicalHandlercomment in class XMLHandlerXMLHandler.comment(char[], int, int)public void endCDATA()
endCDATA in interface LexicalHandlerendCDATA in class XMLHandlerXMLHandler.endCDATA()public void endDTD()
endDTD in interface LexicalHandlerendDTD in class XMLHandlerXMLHandler.endDTD()public void endElement(String uri, String localName, String name)
endElement in interface ContentHandlerendElement in class XMLHandlerXMLHandler.endElement(java.lang.String, java.lang.String,
java.lang.String)public void endEntity(String name)
endEntity in interface LexicalHandlerendEntity in class XMLHandlerXMLHandler.endEntity(java.lang.String)public void endPrefixMapping(String prefix)
endPrefixMapping in interface ContentHandlerendPrefixMapping in class XMLHandlerXMLHandler.endPrefixMapping(java.lang.String)public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public void error(SAXParseException e) throws SAXException
error in interface ErrorHandlererror in class XMLHandlerSAXExceptionXMLHandler.error(org.xml.sax.SAXParseException)public void error(XMIException e)
error in class XMLHandlerXMLHandler.error(org.eclipse.emf.ecore.xmi.XMIException)public void fatalError(SAXParseException e) throws SAXException
fatalError in interface ErrorHandlerfatalError in class XMLHandlerSAXExceptionXMLHandler.fatalError(org.xml.sax.SAXParseException)public void fatalError(XMIException e)
fatalError in class XMLHandlerXMLHandler.fatalError(org.eclipse.emf.ecore.xmi.XMIException)public int hashCode()
hashCode in class ObjectObject.hashCode()public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class XMLHandlerSAXExceptionXMLHandler.ignorableWhitespace(char[], int, int)public void notationDecl(String name, String publicId, String systemId) throws SAXException
notationDecl in interface DTDHandlernotationDecl in class XMLHandlerSAXExceptionXMLHandler.notationDecl(java.lang.String, java.lang.String,
java.lang.String)public void prepare(XMLResource resource, XMLHelper xmlHelper, Map<?,?> options)
prepare in interface XMLDefaultHandlerprepare in class XMLHandlerXMLHandler.prepare(org.eclipse.emf.ecore.xmi.XMLResource,
org.eclipse.emf.ecore.xmi.XMLHelper, java.util.Map)public void processingInstruction(String target, String data)
processingInstruction in interface ContentHandlerprocessingInstruction in class XMLHandlerXMLHandler.processingInstruction(java.lang.String,
java.lang.String)public void reset()
reset in interface XMLDefaultHandlerreset in class XMLHandlerXMLHandler.reset()public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity in interface EntityResolverresolveEntity in class XMLHandlerSAXExceptionXMLHandler.resolveEntity(java.lang.String, java.lang.String)public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class XMLHandlerXMLHandler.setDocumentLocator(org.xml.sax.Locator)public void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerskippedEntity in class XMLHandlerSAXExceptionXMLHandler.skippedEntity(java.lang.String)public void startCDATA()
startCDATA in interface LexicalHandlerstartCDATA in class XMLHandlerXMLHandler.startCDATA()public void startDocument()
startDocument in interface ContentHandlerstartDocument in class XMLHandlerXMLHandler.startDocument()public void startDTD(String name, String publicId, String systemId)
startDTD in interface LexicalHandlerstartDTD in class XMLHandlerXMLHandler.startDTD(java.lang.String, java.lang.String,
java.lang.String)public void startElement(String uri, String localName, String name)
startElement in class XMLHandlerXMLHandler.startElement(java.lang.String, java.lang.String,
java.lang.String)public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class XMLHandlerSAXExceptionXMLHandler.startElement(java.lang.String, java.lang.String,
java.lang.String, org.xml.sax.Attributes)public void startEntity(String name)
startEntity in interface LexicalHandlerstartEntity in class XMLHandlerXMLHandler.startEntity(java.lang.String)public void startPrefixMapping(String prefix, String uri)
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class XMLHandlerXMLHandler.startPrefixMapping(java.lang.String, java.lang.String)public String toString()
toString in class ObjectObject.toString()public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
unparsedEntityDecl in interface DTDHandlerunparsedEntityDecl in class XMLHandlerSAXExceptionXMLHandler.unparsedEntityDecl(java.lang.String, java.lang.String,
java.lang.String, java.lang.String)public void warning(SAXParseException e) throws SAXException
warning in interface ErrorHandlerwarning in class XMLHandlerSAXExceptionXMLHandler.warning(org.xml.sax.SAXParseException)public void warning(XMIException e)
warning in class XMLHandlerXMLHandler.warning(org.eclipse.emf.ecore.xmi.XMIException)protected String getXSIType()
getXSIType in class XMLHandlerXMLHandler.getXSIType()protected void handleObjectAttribs(EObject obj)
handleObjectAttribs in class XMLHandlerXMLHandler.handleObjectAttribs(org.eclipse.emf.ecore.EObject)protected static Object reflectiveCall(String key, Object target, String methodName, Object... params)
accessible.key - The key of the bucket in which the Method object is stored within METHOD_CACHE.target - Target upon which we should invoke this method.methodName - Name of the method we are to call.params - Parameters of the invocation.protected static void setField(String fieldName, Object target, Object value)
accessible.fieldName - Name of the field we should set.target - The actual object which field we are to set.value - Value to which this field should be set.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.