com.puppycrawl.tools.checkstyle.checks

Class FileContentsHolder

Implemented Interfaces:
Configurable, Contextualizable

public class FileContentsHolder
extends Check

Holds the current file contents for global access when configured as a TreeWalker sub-module. For example, a filter can access the current file contents through this module.

Authors:
Mike McMahon
Rick Giles

Method Summary

void
beginTree(DetailAST aRootAST)
void
finishTree(DetailAST aRootAST)
static FileContents
getContents()
int[]
getDefaultTokens()

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

beginTree

public void beginTree(DetailAST aRootAST)
Overrides:
beginTree in interface Check

See Also:
Check


finishTree

public void finishTree(DetailAST aRootAST)
Overrides:
finishTree in interface Check

See Also:
Check


getContents

public static FileContents getContents()

Returns:
the current file contents.


getDefaultTokens

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

See Also:
Check.getDefaultTokens()