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 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 XmlLoader
error, parseInputSource, resolveEntityMethods inherited from class DefaultHandler
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
MODULE
-
NAME
-
PROPERTY
-
VALUE
-
DEFAULT
-
SEVERITY
-
MESSAGE
-
METADATA
-
KEY
-
-
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
-