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 final Deque<DefaultConfiguration>
The loaded configurations.private Configuration
The Configuration that is being built.private static final String
Default attribute.private static final String
Name of the key attribute.private static final String
Name of the message element.private static final String
Name of the message element.private static final String
Module elements.private static final String
Name attribute.private static final String
Property element.private static final String
Name of the severity property.private static final String
Value attribute. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
containsAttribute
(Configuration module, String attributeName) Util method to recheck attribute in module.void
endElement
(String uri, String localName, String qName) void
startElement
(String uri, String localName, String qName, Attributes attributes) Methods inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
error, parseInputSource, resolveEntity
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
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:
-
configStack
The loaded configurations. -
configuration
The Configuration that is being built.
-
-
Constructor Details
-
InternalLoader
Creates 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:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in 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
-