Class AbstractXmlRule

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.rule.ImmutableLanguage, net.sourceforge.pmd.properties.PropertySource, net.sourceforge.pmd.Rule
    Direct Known Subclasses:
    AbstractDomXmlRule, AbstractWsdlRule

    public class AbstractXmlRule
    extends net.sourceforge.pmd.lang.rule.AbstractRule
    implements net.sourceforge.pmd.lang.rule.ImmutableLanguage
    This is a base class for XML Java bases rules. Subclasses should override visit(XmlNode, RuleContext) and can call super to visit children.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        AbstractXmlRule()  
      protected AbstractXmlRule​(net.sourceforge.pmd.lang.Language language)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(java.util.List<? extends net.sourceforge.pmd.lang.ast.Node> nodes, net.sourceforge.pmd.RuleContext ctx)  
      net.sourceforge.pmd.lang.ParserOptions getParserOptions()  
      protected void visit​(XmlNode node, net.sourceforge.pmd.RuleContext ctx)  
      protected void visitAll​(java.util.List<? extends net.sourceforge.pmd.lang.ast.Node> nodes, net.sourceforge.pmd.RuleContext ctx)  
      • Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule

        addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getPriority, getPropertySourceType, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, isDfa, isMultifile, isRuleChain, isTypeResolution, setDeprecated, setDescription, setDfa, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setMultifile, setName, setPriority, setRuleClass, setRuleSetName, setSince, setTypeResolution, setUsesDFA, setUsesMultifile, setUsesTypeResolution, start, usesDFA, usesMultifile, usesRuleChain, usesTypeResolution
      • Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource

        copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface net.sourceforge.pmd.properties.PropertySource

        definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
    • Field Detail

      • COALESCING_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty COALESCING_DESCRIPTOR
      • EXPAND_ENTITY_REFERENCES_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty EXPAND_ENTITY_REFERENCES_DESCRIPTOR
      • IGNORING_COMMENTS_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty IGNORING_COMMENTS_DESCRIPTOR
      • IGNORING_ELEMENT_CONTENT_WHITESPACE_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty IGNORING_ELEMENT_CONTENT_WHITESPACE_DESCRIPTOR
      • NAMESPACE_AWARE_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty NAMESPACE_AWARE_DESCRIPTOR
      • VALIDATING_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty VALIDATING_DESCRIPTOR
      • XINCLUDE_AWARE_DESCRIPTOR

        public static final net.sourceforge.pmd.properties.BooleanProperty XINCLUDE_AWARE_DESCRIPTOR
    • Constructor Detail

      • AbstractXmlRule

        public AbstractXmlRule()
      • AbstractXmlRule

        protected AbstractXmlRule​(net.sourceforge.pmd.lang.Language language)
    • Method Detail

      • getParserOptions

        public net.sourceforge.pmd.lang.ParserOptions getParserOptions()
        Specified by:
        getParserOptions in interface net.sourceforge.pmd.Rule
        Overrides:
        getParserOptions in class net.sourceforge.pmd.lang.rule.AbstractRule
      • apply

        public void apply​(java.util.List<? extends net.sourceforge.pmd.lang.ast.Node> nodes,
                          net.sourceforge.pmd.RuleContext ctx)
        Specified by:
        apply in interface net.sourceforge.pmd.Rule
      • visitAll

        protected void visitAll​(java.util.List<? extends net.sourceforge.pmd.lang.ast.Node> nodes,
                                net.sourceforge.pmd.RuleContext ctx)
      • visit

        protected void visit​(XmlNode node,
                             net.sourceforge.pmd.RuleContext ctx)