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

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

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.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(java.util.Map<java.lang.String,java.lang.String> aPublicIdToResourceNameMap)` Creates a new instance.
`protected` `AbstractLoader(java.lang.String aPublicId, java.lang.String aDtdResourceName)` Creates a new instance.

Method Summary
`void` `error(org.xml.sax.SAXParseException aEx)`
`void` `fatalError(org.xml.sax.SAXParseException aEx)`
`void` `parseInputSource(org.xml.sax.InputSource aInputSource)` Parses the specified input source.
`org.xml.sax.InputSource` `resolveEntity(java.lang.String aPublicId, java.lang.String aSystemId)`
`void` `warning(org.xml.sax.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(java.lang.String aPublicId,
                             java.lang.String aDtdResourceName)
                      throws org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException

  Creates a new instance.

  Parameters:
    `aPublicId` - the public ID for the DTD to resolve
    `aDtdResourceName` - the resource for the DTD
  Throws:
    `org.xml.sax.SAXException` - if an error occurs
    `javax.xml.parsers.ParserConfigurationException` - if an error occurs

### AbstractLoader

    protected AbstractLoader(java.util.Map<java.lang.String,java.lang.String> aPublicIdToResourceNameMap)
                      throws org.xml.sax.SAXException,
                             javax.xml.parsers.ParserConfigurationException

  Creates a new instance.

  Parameters:
    `aPublicIdToResourceNameMap` - maps public IDs to DTD resource names
  Throws:
    `org.xml.sax.SAXException` - if an error occurs
    `javax.xml.parsers.ParserConfigurationException` - if an error occurs

Method Detail

### parseInputSource

    public void parseInputSource(org.xml.sax.InputSource aInputSource)
                          throws java.io.IOException,
                                 org.xml.sax.SAXException

  Parses the specified input source.

  Parameters:
    `aInputSource` - the input source to parse.
  Throws:
    `java.io.IOException` - if an error occurs
    `org.xml.sax.SAXException` - in an error occurs

### resolveEntity

    public org.xml.sax.InputSource resolveEntity(java.lang.String aPublicId,
                                                 java.lang.String aSystemId)
                                          throws org.xml.sax.SAXException,
                                                 java.io.IOException

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

### warning

    public void warning(org.xml.sax.SAXParseException aEx)
                 throws org.xml.sax.SAXException

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

### error

    public void error(org.xml.sax.SAXParseException aEx)
               throws org.xml.sax.SAXException

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

### fatalError

    public void fatalError(org.xml.sax.SAXParseException aEx)
                    throws org.xml.sax.SAXException

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

Copyright © 2001-2010. All Rights Reserved.