Class JavaRuleViolation

  • All Implemented Interfaces:
    net.sourceforge.pmd.RuleViolation
    Direct Known Subclasses:
    DaaRuleViolation

    public class JavaRuleViolation
    extends net.sourceforge.pmd.lang.rule.ParametricRuleViolation<JavaNode>
    This is a Java RuleViolation. It knows how to try to extract the following extra information from the violation node:
    • Package name
    • Class name
    • Method name
    • Variable name
    • Suppression indicator
    • Field Summary

      • Fields inherited from class net.sourceforge.pmd.lang.rule.ParametricRuleViolation

        beginColumn, beginLine, className, description, endColumn, endLine, filename, methodName, packageName, rule, suppressed, variableName
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaRuleViolation​(net.sourceforge.pmd.Rule rule, net.sourceforge.pmd.RuleContext ctx, JavaNode node, java.lang.String message)  
      JavaRuleViolation​(net.sourceforge.pmd.Rule rule, net.sourceforge.pmd.RuleContext ctx, JavaNode node, java.lang.String message, int beginLine, int endLine)  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static boolean isSupressed​(net.sourceforge.pmd.lang.ast.Node node, net.sourceforge.pmd.Rule rule)
      Deprecated.
      Is internal API, not useful, there's a typo.
      • Methods inherited from class net.sourceforge.pmd.lang.rule.ParametricRuleViolation

        expandVariables, getBeginColumn, getBeginLine, getClassName, getDescription, getEndColumn, getEndLine, getFilename, getMethodName, getPackageName, getRule, getVariableName, getVariableValue, isSuppressed, isVariable, setLines, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JavaRuleViolation

        public JavaRuleViolation​(net.sourceforge.pmd.Rule rule,
                                 net.sourceforge.pmd.RuleContext ctx,
                                 JavaNode node,
                                 java.lang.String message,
                                 int beginLine,
                                 int endLine)
      • JavaRuleViolation

        public JavaRuleViolation​(net.sourceforge.pmd.Rule rule,
                                 net.sourceforge.pmd.RuleContext ctx,
                                 JavaNode node,
                                 java.lang.String message)
    • Method Detail

      • isSupressed

        @Deprecated
        public static boolean isSupressed​(net.sourceforge.pmd.lang.ast.Node node,
                                          net.sourceforge.pmd.Rule rule)
        Deprecated.
        Is internal API, not useful, there's a typo. See #1927
        Check for suppression on this node, on parents, and on contained types for ASTCompilationUnit
        Parameters:
        node -