Package com.puppycrawl.tools.checkstyle
Class PackageNamesLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.puppycrawl.tools.checkstyle.XmlLoader
com.puppycrawl.tools.checkstyle.PackageNamesLoader
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Loads a list of package names from a package name XML file.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
XmlLoader.LoadExternalDtdFeatureProvider -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String uri, String localName, String qName) getPackageNames(ClassLoader classLoader) Returns the set of package names, compiled from all checkstyle_packages.xml files found on the given class loaders classpath.voidstartElement(String uri, String localName, String qName, Attributes attributes) Methods inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
error, parseInputSource, resolveEntityMethods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Method Details
-
startElement
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
getPackageNames
Returns the set of package names, compiled from all checkstyle_packages.xml files found on the given class loaders classpath.- Parameters:
classLoader- the class loader for loading the checkstyle_packages.xml files.- Returns:
- the set of package names.
- Throws:
CheckstyleException- if an error occurs.
-