Class ParametricRuleViolation<T extends Node>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String expandVariables​(java.lang.String message)  
      int getBeginColumn()
      Get the column number of the begin line in the source file in which this violation was identified.
      int getBeginLine()
      Get the begin line number in the source file in which this violation was identified.
      java.lang.String getClassName()
      Get the name of the Class in which this violation was identified.
      java.lang.String getDescription()
      Get the description of this violation.
      int getEndColumn()
      Get the column number of the end line in the source file in which this violation was identified.
      int getEndLine()
      Get the end line number in the source file in which this violation was identified.
      java.lang.String getFilename()
      Get the source file name in which this violation was identified.
      java.lang.String getMethodName()
      Get the method name in which this violation was identified.
      java.lang.String getPackageName()
      Get the package name of the Class in which this violation was identified.
      Rule getRule()
      Get the Rule which identified this violation.
      java.lang.String getVariableName()
      Get the variable name on which this violation was identified.
      protected java.lang.String getVariableValue​(java.lang.String name)  
      boolean isSuppressed()
      Indicates whether this violation has been suppressed.
      protected boolean isVariable​(java.lang.String name)  
      void setLines​(int theBeginLine, int theEndLine)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • rule

        protected final Rule rule
      • description

        protected final java.lang.String description
      • suppressed

        protected boolean suppressed
      • filename

        protected java.lang.String filename
      • beginLine

        protected int beginLine
      • beginColumn

        protected int beginColumn
      • endLine

        protected int endLine
      • endColumn

        protected int endColumn
      • packageName

        protected java.lang.String packageName
      • className

        protected java.lang.String className
      • methodName

        protected java.lang.String methodName
      • variableName

        protected java.lang.String variableName
    • Constructor Detail

      • ParametricRuleViolation

        public ParametricRuleViolation​(Rule theRule,
                                       RuleContext ctx,
                                       T node,
                                       java.lang.String message)
    • Method Detail

      • expandVariables

        protected java.lang.String expandVariables​(java.lang.String message)
      • isVariable

        protected boolean isVariable​(java.lang.String name)
      • getVariableValue

        protected java.lang.String getVariableValue​(java.lang.String name)
      • getRule

        public Rule getRule()
        Description copied from interface: RuleViolation
        Get the Rule which identified this violation.
        Specified by:
        getRule in interface RuleViolation
        Returns:
        The identifying Rule.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: RuleViolation
        Get the description of this violation.
        Specified by:
        getDescription in interface RuleViolation
        Returns:
        The description.
      • isSuppressed

        public boolean isSuppressed()
        Description copied from interface: RuleViolation
        Indicates whether this violation has been suppressed.
        Specified by:
        isSuppressed in interface RuleViolation
        Returns:
        true if this violation is suppressed, false otherwise.
      • getFilename

        public java.lang.String getFilename()
        Description copied from interface: RuleViolation
        Get the source file name in which this violation was identified.
        Specified by:
        getFilename in interface RuleViolation
        Returns:
        The source file name.
      • getBeginLine

        public int getBeginLine()
        Description copied from interface: RuleViolation
        Get the begin line number in the source file in which this violation was identified.
        Specified by:
        getBeginLine in interface RuleViolation
        Returns:
        Begin line number.
      • getBeginColumn

        public int getBeginColumn()
        Description copied from interface: RuleViolation
        Get the column number of the begin line in the source file in which this violation was identified.
        Specified by:
        getBeginColumn in interface RuleViolation
        Returns:
        Begin column number.
      • getEndLine

        public int getEndLine()
        Description copied from interface: RuleViolation
        Get the end line number in the source file in which this violation was identified.
        Specified by:
        getEndLine in interface RuleViolation
        Returns:
        End line number.
      • getEndColumn

        public int getEndColumn()
        Description copied from interface: RuleViolation
        Get the column number of the end line in the source file in which this violation was identified.
        Specified by:
        getEndColumn in interface RuleViolation
        Returns:
        End column number.
      • getPackageName

        public java.lang.String getPackageName()
        Description copied from interface: RuleViolation
        Get the package name of the Class in which this violation was identified.
        Specified by:
        getPackageName in interface RuleViolation
        Returns:
        The package name.
      • getClassName

        public java.lang.String getClassName()
        Description copied from interface: RuleViolation
        Get the name of the Class in which this violation was identified.
        Specified by:
        getClassName in interface RuleViolation
        Returns:
        The Class name.
      • getMethodName

        public java.lang.String getMethodName()
        Description copied from interface: RuleViolation
        Get the method name in which this violation was identified.
        Specified by:
        getMethodName in interface RuleViolation
        Returns:
        The method name.
      • getVariableName

        public java.lang.String getVariableName()
        Description copied from interface: RuleViolation
        Get the variable name on which this violation was identified.
        Specified by:
        getVariableName in interface RuleViolation
        Returns:
        The variable name.
      • setLines

        public void setLines​(int theBeginLine,
                             int theEndLine)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object