## com.puppycrawl.tools.checkstyle.api
Class AbstractLoader

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          com.puppycrawl.tools.checkstyle.api.AbstractLoader

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

Direct Known Subclasses:
  PackageNamesLoader, SuppressionsLoader

    public abstract class AbstractLoader

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.

Author:
  Oliver Burn

Constructor Summary
`protected` `AbstractLoader(Map<String,String> aPublicIdToResourceNameMap)` Creates a new instance.
`protected` `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)`

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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
  Throws:
    `SAXException` - if an error occurs
    `ParserConfigurationException` - if an error occurs

### AbstractLoader

    protected AbstractLoader(Map<String,String> aPublicIdToResourceNameMap)
                      throws SAXException,
                             ParserConfigurationException

  Creates a new instance.

  Parameters:
    `aPublicIdToResourceNameMap` - maps public IDs to DTD resource names
  Throws:
    `SAXException` - if an error occurs
    `ParserConfigurationException` - if an error occurs

Method Detail

### parseInputSource

    public void parseInputSource(InputSource aInputSource)
                          throws IOException,
                                 SAXException

  Parses the specified input source.

  Parameters:
    `aInputSource` - the input source to parse.
  Throws:
    `IOException` - if an error occurs
    `SAXException` - in an error occurs

### resolveEntity

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

  Specified by:
    `resolveEntity` in interface `EntityResolver`
  Overrides:
    `resolveEntity` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `SAXException`
    `IOException`

### warning

    public void warning(SAXParseException aEx)
                 throws SAXException

  Specified by:
    `warning` in interface `ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `SAXException`

### error

    public void error(SAXParseException aEx)
               throws SAXException

  Specified by:
    `error` in interface `ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `SAXException`

### fatalError

    public void fatalError(SAXParseException aEx)
                    throws SAXException

  Specified by:
    `fatalError` in interface `ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `SAXException`

Copyright © 2001-2011. All Rights Reserved.