net.sourceforge.pmd.lang.rule

## Class ParametricRuleViolation<T extends Node>

- java.lang.Object
- - net.sourceforge.pmd.lang.rule.ParametricRuleViolation<T>

- All Implemented Interfaces:
    RuleViolation
  Direct Known Subclasses:
    JavaRuleViolation

      public class ParametricRuleViolation<T extends Node>
      extends Object
      implements RuleViolation

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `beginColumn`
    `protected int` | `beginLine`
    `protected String` | `className`
    `protected String` | `description`
    `protected int` | `endColumn`
    `protected int` | `endLine`
    `protected String` | `filename`
    `protected String` | `methodName`
    `protected String` | `packageName`
    `protected Rule` | `rule`
    `protected boolean` | `suppressed`
    `protected String` | `variableName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParametricRuleViolation(Rule theRule, RuleContext ctx, T node, String message)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `expandVariables(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.
    `String` | `getClassName()` Get the name of the Class in which this violation was identified.
    `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.
    `String` | `getFilename()` Get the source file name in which this violation was identified.
    `String` | `getMethodName()` Get the method name in which this violation was identified.
    `String` | `getPackageName()` Get the package name of the Class in which this violation was identified.
    `Rule` | `getRule()` Get the Rule which identified this violation.
    `String` | `getVariableName()` Get the variable name on which this violation was identified.
    `protected String` | `getVariableValue(String name)`
    `boolean` | `isSuppressed()` Indicates whether this violation has been suppressed.
    `protected boolean` | `isVariable(String name)`
    `void` | `setLines(int theBeginLine, int theEndLine)`
    `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 String description

    - #### suppressed

          protected boolean suppressed

    - #### filename

          protected String filename

    - #### beginLine

          protected int beginLine

    - #### beginColumn

          protected int beginColumn

    - #### endLine

          protected int endLine

    - #### endColumn

          protected int endColumn

    - #### packageName

          protected String packageName

    - #### className

          protected String className

    - #### methodName

          protected String methodName

    - #### variableName

          protected String variableName

  - ### Constructor Detail

    - #### ParametricRuleViolation

          public ParametricRuleViolation(Rule theRule,
                                 RuleContext ctx,
                                 T node,
                                 String message)

  - ### Method Detail

    - #### expandVariables

          protected String expandVariables(String message)

    - #### isVariable

          protected boolean isVariable(String name)

    - #### getVariableValue

          protected String getVariableValue(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 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 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 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 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 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 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 String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2002-2013 InfoEther. All Rights Reserved.