Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  ContentHandler, DTDHandler, EntityResolver, 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(String aNamespaceURI, String aLocalName, String aQName)`
`static Set<String>` | `getPackageNames(ClassLoader aClassLoader)` Returns the set of package names, compiled from all checkstyle_packages.xml files found on the given classloaders classpath.
`void` | `startElement(String aNamespaceURI, String aLocalName, String aQName, 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(String aNamespaceURI,
                             String aLocalName,
                             String aQName,
                             Attributes aAtts)
                      throws SAXException

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

### endElement

    public void endElement(String aNamespaceURI,
                           String aLocalName,
                           String aQName)

  Specified by:
    `endElement` in interface `ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`

### getPackageNames

    public static Set<String> getPackageNames(ClassLoader aClassLoader)
                                       throws CheckstyleException

  Returns the set of package names, compiled from all checkstyle_packages.xml files found on the given classloaders classpath.

  Parameters:
    `aClassLoader` - the class loader for loading the checkstyle_packages.xml files.
  Returns:
    the set of package names.
  Throws:
    `CheckstyleException` - if an error occurs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011. All Rights Reserved.