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:
PackageNamesLoader,SuppressionsLoader
public class XmlLoader extends 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 classXmlLoader.FeaturesForVerySecureJavaInstallationsUsed for setting specific for secure java installations features to SAXParserFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException exception)voidfatalError(SAXParseException exception)voidparseInputSource(InputSource inputSource)Parses the specified input source.InputSourceresolveEntity(String publicId, String systemId)-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
XmlLoader
protected XmlLoader(Map<String,String> publicIdToResourceNameMap) throws SAXException, ParserConfigurationException
Creates a new instance.- Parameters:
publicIdToResourceNameMap- maps public IDs to DTD resource names- Throws:
SAXException- if an error occursParserConfigurationException- if an error occurs
-
-
Method Detail
-
parseInputSource
public void parseInputSource(InputSource inputSource) throws IOException, SAXException
Parses the specified input source.- Parameters:
inputSource- the input source to parse.- Throws:
IOException- if an error occursSAXException- in an error occurs
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver- Overrides:
resolveEntityin classDefaultHandler- Throws:
SAXExceptionIOException
-
error
public void error(SAXParseException exception) throws SAXException
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
- Specified by:
fatalErrorin interfaceErrorHandler- Overrides:
fatalErrorin classDefaultHandler- Throws:
SAXException
-
-