Class ImportControlLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.puppycrawl.tools.checkstyle.XmlLoader
com.puppycrawl.tools.checkstyle.checks.imports.ImportControlLoader
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Responsible for loading the contents of an import control configuration file.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
XmlLoader.LoadExternalDtdFeatureProvider -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String namespaceUri, String localName, String qName) static com.puppycrawl.tools.checkstyle.checks.imports.PkgImportControlLoads the import control file from a file.voidstartElement(String namespaceUri, 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
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler
-
load
public static com.puppycrawl.tools.checkstyle.checks.imports.PkgImportControl load(URI uri) throws CheckstyleException Loads the import control file from a file.- Parameters:
uri- the uri of the file to load.- Returns:
- the root
PkgImportControlobject. - Throws:
CheckstyleException- if an error occurs.
-