Class SpringLambdaCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- io.spring.javaformat.checkstyle.check.SpringLambdaCheck
-
- All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable,com.puppycrawl.tools.checkstyle.api.Contextualizable
public class SpringLambdaCheck extends com.puppycrawl.tools.checkstyle.api.AbstractCheckChecks that lambda definitions follow Spring conventions. Single argument lambda parameters should have parentheses. Single statement implementations should not use curly braces.- Author:
- Phillip Webb
-
-
Field Summary
Fields Modifier and Type Field Description static int[]NO_REQUIRED_TOKENS
-
Constructor Summary
Constructors Constructor Description SpringLambdaCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]getAcceptableTokens()int[]getDefaultTokens()int[]getRequiredTokens()voidsetSingleArgumentParentheses(boolean singleArgumentParentheses)voidvisitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
beginTree, clearViolations, destroy, finishTree, getFileContents, getLine, getLineCodePoints, getLines, getTabWidth, getTokenNames, getViolations, init, isCommentNodesRequired, leaveToken, log, log, log, setFileContents, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
-
-
-
-
Method Detail
-
getAcceptableTokens
public int[] getAcceptableTokens()
- Specified by:
getAcceptableTokensin classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
visitToken
public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
- Overrides:
visitTokenin classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
setSingleArgumentParentheses
public void setSingleArgumentParentheses(boolean singleArgumentParentheses)
-
getDefaultTokens
public int[] getDefaultTokens()
- Specified by:
getDefaultTokensin classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
getRequiredTokens
public int[] getRequiredTokens()
- Specified by:
getRequiredTokensin classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
-