Class AbstractParenPadCheck

All Implemented Interfaces:
Configurable, Contextualizable
Direct Known Subclasses:
ParenPadCheck, TypecastParenPadCheck

public abstract class AbstractParenPadCheck extends AbstractCheck

Abstract class for checking the padding of parentheses. That is whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden.

  • Field Details

    • MSG_WS_FOLLOWED

      public static final String MSG_WS_FOLLOWED
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • MSG_WS_NOT_FOLLOWED

      public static final String MSG_WS_NOT_FOLLOWED
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • MSG_WS_PRECEDED

      public static final String MSG_WS_PRECEDED
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
    • MSG_WS_NOT_PRECEDED

      public static final String MSG_WS_NOT_PRECEDED
      A key is pointing to the warning message text in "messages.properties" file.
      See Also:
  • Constructor Details

    • AbstractParenPadCheck

      public AbstractParenPadCheck()
  • Method Details

    • setOption

      public void setOption(String optionStr)
      Set the option to enforce.
      Parameters:
      optionStr - string to decode option from
      Throws:
      IllegalArgumentException - if unable to decode
    • processLeft

      protected void processLeft(DetailAST ast)
      Process a token representing a left parentheses.
      Parameters:
      ast - the token representing a left parentheses
    • processRight

      protected void processRight(DetailAST ast)
      Process a token representing a right parentheses.
      Parameters:
      ast - the token representing a right parentheses