com.puppycrawl.tools.checkstyle.api

Class AbstractLoader

Known Direct Subclasses:
PackageNamesLoader, SuppressionsLoader

public abstract class AbstractLoader
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.

Author:
Oliver Burn

Constructor Summary

AbstractLoader(Map aPublicIdToResourceNameMap)
Creates a new instance.
AbstractLoader(String aPublicId, String aDtdResourceName)
Creates a new instance.

Method Summary

void
error(SAXParseException aEx)
void
fatalError(SAXParseException aEx)
void
parseInputSource(InputSource aInputSource)
Parses the specified input source.
InputSource
resolveEntity(String aPublicId, String aSystemId)
void
warning(SAXParseException aEx)

Constructor Details

AbstractLoader

protected AbstractLoader(Map aPublicIdToResourceNameMap)
            throws SAXException,
                   ParserConfigurationException
Creates a new instance.
Parameters:
aPublicIdToResourceNameMap - maps public IDs to DTD resource names

AbstractLoader

protected AbstractLoader(String aPublicId,
                         String aDtdResourceName)
            throws SAXException,
                   ParserConfigurationException
Creates a new instance.
Parameters:
aPublicId - the public ID for the DTD to resolve
aDtdResourceName - the resource for the DTD

Method Details

error

public void error(SAXParseException aEx)
            throws SAXException

fatalError

public void fatalError(SAXParseException aEx)
            throws SAXException

parseInputSource

public void parseInputSource(InputSource aInputSource)
            throws IOException,
                   SAXException
Parses the specified input source.
Parameters:
aInputSource - the input source to parse.

resolveEntity

public InputSource resolveEntity(String aPublicId,
                                 String aSystemId)
            throws SAXException

warning

public void warning(SAXParseException aEx)
            throws SAXException