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:
org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler
- Enclosing class:
- ConfigurationLoader
private final class ConfigurationLoader.InternalLoader extends XmlLoader
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
Fields Modifier and Type Field Description private static java.lang.StringDEFAULTDefault attribute.private static java.lang.StringKEYName of the key attribute.private static java.lang.StringMESSAGEName of the message element.private static java.lang.StringMETADATAName of the message element.private static java.lang.StringMODULEModule elements.private static java.lang.StringNAMEName attribute.private static java.lang.StringPROPERTYProperty element.private static java.lang.StringSEVERITYName of the severity property.private static java.lang.StringVALUEValue attribute.
-
Constructor Summary
Constructors Constructor Description InternalLoader()Creates a new InternalLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancontainsAttribute(Configuration module, java.lang.String attributeName)Util method to recheck attribute in module.voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)-
Methods inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
error, parseInputSource, resolveEntity
-
-
-
-
Field Detail
-
MODULE
private static final java.lang.String MODULE
Module elements.- See Also:
- Constant Field Values
-
NAME
private static final java.lang.String NAME
Name attribute.- See Also:
- Constant Field Values
-
PROPERTY
private static final java.lang.String PROPERTY
Property element.- See Also:
- Constant Field Values
-
VALUE
private static final java.lang.String VALUE
Value attribute.- See Also:
- Constant Field Values
-
DEFAULT
private static final java.lang.String DEFAULT
Default attribute.- See Also:
- Constant Field Values
-
SEVERITY
private static final java.lang.String SEVERITY
Name of the severity property.- See Also:
- Constant Field Values
-
MESSAGE
private static final java.lang.String MESSAGE
Name of the message element.- See Also:
- Constant Field Values
-
METADATA
private static final java.lang.String METADATA
Name of the message element.- See Also:
- Constant Field Values
-
KEY
private static final java.lang.String KEY
Name of the key attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InternalLoader
InternalLoader() throws org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
Creates a new InternalLoader.- Throws:
org.xml.sax.SAXException- if an error occursjavax.xml.parsers.ParserConfigurationException- if an error occurs
-
-
Method Detail
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Overrides:
startElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Overrides:
endElementin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
containsAttribute
private boolean containsAttribute(Configuration module, java.lang.String attributeName)
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
-
-