## com.puppycrawl.tools.checkstyle
Class PackageNamesLoader

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

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public final class PackageNamesLoader
extends AbstractLoader

Loads a list of package names from a package name XML file.

Version:
  4-Dec-2002
Author:
  Rick Giles

Method Summary
`void` `endElement(java.lang.String aNamespaceURI, java.lang.String aLocalName, java.lang.String aQName)`
`static ModuleFactory` `loadModuleFactory(java.lang.ClassLoader aClassLoader)` Returns the default list of package names.
`static ModuleFactory` `loadModuleFactory(java.lang.String aFilename)` Returns the package names in a specified file.
`void` `startElement(java.lang.String aNamespaceURI, java.lang.String aLocalName, java.lang.String aQName, org.xml.sax.Attributes aAtts)`

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractLoader
`error, fatalError, parseInputSource, resolveEntity, warning`

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

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

Method Detail

### startElement

    public void startElement(java.lang.String aNamespaceURI,
                             java.lang.String aLocalName,
                             java.lang.String aQName,
                             org.xml.sax.Attributes aAtts)
                      throws org.xml.sax.SAXException

  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler`

### endElement

    public void endElement(java.lang.String aNamespaceURI,
                           java.lang.String aLocalName,
                           java.lang.String aQName)

  See Also:
    `DefaultHandler`

### loadModuleFactory

    public static ModuleFactory loadModuleFactory(java.lang.ClassLoader aClassLoader)
                                           throws CheckstyleException

  Returns the default list of package names.

  Parameters:
    `aClassLoader` - the class loader that gets the default package names.
  Returns:
    the default list of package names.
  Throws:
    `CheckstyleException` - if an error occurs.

### loadModuleFactory

    public static ModuleFactory loadModuleFactory(java.lang.String aFilename)
                                           throws CheckstyleException

  Returns the package names in a specified file.

  Parameters:
    `aFilename` - name of the package file.
  Returns:
    the list of package names stored in the package file.
  Throws:
    `CheckstyleException` - if an error occurs.

Back to the Checkstyle Home Page