com.puppycrawl.tools.checkstyle.checks

Class ArrayTypeStyleCheck

Implemented Interfaces:
Configurable, Contextualizable

public class ArrayTypeStyleCheck
extends Check

Checks the style of array type definitions. Some like Java-style: public static void main(String[] args) and some like C-style: public static void main(String args[]) By default the Check enforces Java style.

Author:
lkuehne

Method Summary

int[]
getDefaultTokens()
void
setJavaStyle(boolean aJavaStyle)
Controls whether to check for Java or C style.
void
visitToken(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

getDefaultTokens

public int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check

See Also:
Check


setJavaStyle

public void setJavaStyle(boolean aJavaStyle)
Controls whether to check for Java or C style.

Parameters:
aJavaStyle - true if Java style should be used.


visitToken

public void visitToken(DetailAST aAST)
Overrides:
visitToken in interface Check

See Also:
Check