Package org.apache.felix.scr.impl.xml
Class XmlHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.felix.scr.impl.xml.XmlHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class XmlHandler extends DefaultHandler
XML Parser for the component XML
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanfirstElementFlag for detecting the first element.protected booleanisComponentFlag for elements inside a component elementprotected StringoverrideNamespaceOverride namespace.
-
Constructor Summary
Constructors Constructor Description XmlHandler(org.osgi.framework.Bundle bundle, BundleLogger logger, boolean globalObsoleteFactoryComponentFactory, boolean globalDelayedKeepInstances)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendElement(String uri, String localName, String qName)List<ComponentMetadata>getComponentMetadataList()Called to retrieve the service descriptorsvoidstartElement(String uri, String localName, String qName, Attributes attributes)-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
firstElement
protected boolean firstElement
Flag for detecting the first element.
-
overrideNamespace
protected String overrideNamespace
Override namespace.
-
isComponent
protected boolean isComponent
Flag for elements inside a component element
-
-
Constructor Detail
-
XmlHandler
public XmlHandler(org.osgi.framework.Bundle bundle, BundleLogger logger, boolean globalObsoleteFactoryComponentFactory, boolean globalDelayedKeepInstances)
-
-
Method Detail
-
getComponentMetadataList
public List<ComponentMetadata> getComponentMetadataList()
Called to retrieve the service descriptors- Returns:
- A list of service descriptors
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
-