Package com.puppycrawl.tools.checkstyle
Class ConfigurationLoader.InternalLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.puppycrawl.tools.checkstyle.XmlLoader
com.puppycrawl.tools.checkstyle.ConfigurationLoader.InternalLoader
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Enclosing class:
ConfigurationLoader
Implements the SAX document handler interfaces, so they do not
appear in the public API of the ConfigurationLoader.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
XmlLoader.LoadExternalDtdFeatureProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringDefault attribute.private static final StringName of the key attribute.private static final StringName of the message element.private static final StringName of the message element.private static final StringModule elements.private static final StringName attribute.private static final StringProperty element.private static final StringName of the severity property.private static final StringValue attribute. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancontainsAttribute(Configuration module, String attributeName) Util method to recheck attribute in module.voidendElement(String uri, String localName, String qName) 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
-
Field Details
-
MODULE
Module elements.- See Also:
-
NAME
Name attribute.- See Also:
-
PROPERTY
Property element.- See Also:
-
VALUE
Value attribute.- See Also:
-
DEFAULT
Default attribute.- See Also:
-
SEVERITY
Name of the severity property.- See Also:
-
MESSAGE
Name of the message element.- See Also:
-
METADATA
Name of the message element.- See Also:
-
KEY
Name of the key attribute.- See Also:
-
-
Constructor Details
-
InternalLoader
InternalLoader() throws SAXException, ParserConfigurationExceptionCreates a new InternalLoader.- Throws:
SAXException- if an error occursParserConfigurationException- if an error occurs
-
-
Method Details
-
startElement
public void startElement(String uri, 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- Throws:
SAXException
-
containsAttribute
Util method to recheck attribute in module.- Parameters:
module- module to checkattributeName- name of attribute in module to find- Returns:
- true if attribute is present in module
-