Class NPathComplexityCheck.TokenEnd

java.lang.Object
com.puppycrawl.tools.checkstyle.checks.metrics.NPathComplexityCheck.TokenEnd
Enclosing class:
NPathComplexityCheck

private static final class NPathComplexityCheck.TokenEnd extends Object
Coordinates of token end. Used to prevent inline ternary operator from being processed twice.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    End column of token.
    private int
    End line of token.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    Checks if saved coordinates located after given token.
    (package private) void
    Sets end token coordinates to the start of the file.
    (package private) void
    setToken(DetailAST endToken)
    Sets end coordinates from given token.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • endLineNo

      private int endLineNo
      End line of token.
    • endColumnNo

      private int endColumnNo
      End column of token.
  • Constructor Details

  • Method Details

    • setToken

      void setToken(DetailAST endToken)
      Sets end coordinates from given token.
      Parameters:
      endToken - token.
    • reset

      void reset()
      Sets end token coordinates to the start of the file.
    • isAfter

      boolean isAfter(DetailAST ast)
      Checks if saved coordinates located after given token.
      Parameters:
      ast - given token.
      Returns:
      true, if saved coordinates located after given token.