Package com.puppycrawl.tools.checkstyle
Class XmlLoader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.puppycrawl.tools.checkstyle.XmlLoader
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
- Direct Known Subclasses:
ImportControlLoader
,PackageNamesLoader
,SuppressionsLoader
public class XmlLoader extends org.xml.sax.helpers.DefaultHandler
Contains the common implementation of a loader, for loading a configuration from an XML file.The error handling policy can be described as being austere, dead set, disciplinary, dour, draconian, exacting, firm, forbidding, grim, hard, hard- boiled, harsh, harsh, in line, iron-fisted, no-nonsense, oppressive, persnickety, picky, prudish, punctilious, puritanical, rigid, rigorous, scrupulous, set, severe, square, stern, stickler, straight, strait-laced, stringent, stuffy, stuffy, tough, unpermissive, unsparing and uptight.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XmlLoader.LoadExternalDtdFeatureProvider
Used for setting specific for secure java installations features to SAXParserFactory.
-
Constructor Summary
Constructors Modifier Constructor Description protected
XmlLoader(java.util.Map<java.lang.String,java.lang.String> publicIdToResourceNameMap)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(org.xml.sax.SAXParseException exception)
void
parseInputSource(org.xml.sax.InputSource inputSource)
Parses the specified input source.org.xml.sax.InputSource
resolveEntity(java.lang.String publicId, java.lang.String systemId)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
XmlLoader
protected XmlLoader(java.util.Map<java.lang.String,java.lang.String> publicIdToResourceNameMap) throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Creates a new instance.- Parameters:
publicIdToResourceNameMap
- maps public IDs to DTD resource names- Throws:
org.xml.sax.SAXException
- if an error occursjavax.xml.parsers.ParserConfigurationException
- if an error occurs
-
-
Method Detail
-
parseInputSource
public void parseInputSource(org.xml.sax.InputSource inputSource) throws java.io.IOException, org.xml.sax.SAXException
Parses the specified input source.- Parameters:
inputSource
- the input source to parse.- Throws:
java.io.IOException
- if an error occursorg.xml.sax.SAXException
- in an error occurs
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
- Specified by:
resolveEntity
in interfaceorg.xml.sax.EntityResolver
- Overrides:
resolveEntity
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
java.io.IOException
-
error
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
- Specified by:
error
in interfaceorg.xml.sax.ErrorHandler
- Overrides:
error
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
-