com.puppycrawl.tools.checkstyle.checks.imports

Class ImportControlCheck

public class ImportControlCheck extends Check

Check that controls what packages can be imported in each package. Useful for ensuring that application layering is not violated. Ideas on how the check can be improved include support for:

Author: Oliver Burn

Method Summary
voidbeginTree(DetailAST aRootAST)
{@inheritDoc}
int[]getDefaultTokens()
{@inheritDoc}
voidsetFile(String aName)
Set the parameter for the file containing the import control configuration.
voidvisitToken(DetailAST aAST)
{@inheritDoc}

Method Detail

beginTree

public void beginTree(DetailAST aRootAST)
{@inheritDoc}

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc}

setFile

public void setFile(String aName)
Set the parameter for the file containing the import control configuration. It will cause the file to be loaded.

Parameters: aName the name of the file to load.

Throws: ConversionException on error loading the file.

visitToken

public void visitToken(DetailAST aAST)
{@inheritDoc}