Package com.puppycrawl.tools.checkstyle
Class XmlLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.puppycrawl.tools.checkstyle.XmlLoader
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
ImportControlLoader
,PackageNamesLoader
,SuppressionsLoader
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 ClassesModifier and TypeClassDescriptionstatic final class
Used for setting specific for secure java installations features to SAXParserFactory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
error
(SAXParseException exception) void
parseInputSource
(InputSource inputSource) Parses the specified input source.resolveEntity
(String publicId, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XmlLoader
protected XmlLoader(Map<String, String> publicIdToResourceNameMap) throws SAXException, ParserConfigurationExceptionCreates a new instance.- Parameters:
publicIdToResourceNameMap
- maps public IDs to DTD resource names- Throws:
SAXException
- if an error occursParserConfigurationException
- if an error occurs
-
-
Method Details
-
parseInputSource
Parses the specified input source.- Parameters:
inputSource
- the input source to parse.- Throws:
IOException
- if an error occursSAXException
- in an error occurs
-
resolveEntity
- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
- Throws:
SAXException
IOException
-
error
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
-