Skip to content

Instantly share code, notes, and snippets.

@artsok
Last active October 5, 2023 08:06
Show Gist options
  • Save artsok/557b479c4002bd99a03e3fe833ec024d to your computer and use it in GitHub Desktop.
Save artsok/557b479c4002bd99a03e3fe833ec024d to your computer and use it in GitHub Desktop.
AbstractCheck class from Checkstyle
Method Description
getDefaultTokens() This method defines the default set of tokens that the check will operate on if no specific token configuration is provided
getAcceptableTokens() This method specifies a list of acceptable tokens for the check meaning the tokens that the check can analyze without reporting issues
getRequiredTokens() This method defines a list of required tokens that must be present for the check to execute successfully
visitToken(DetailAST ast) This method is called for each token encountered during the check's analysis of the source code. It allows the check to inspect and evaluate individual tokens in the code making decisions or reporting issues based on the characteristics of each token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment