Prevent user from changing tokens in the configuration.

This commit is contained in:
Rick Giles 2002-12-19 09:46:36 +00:00
parent a14bce7522
commit 7feaf606e8
1 changed files with 20 additions and 1 deletions

View File

@ -81,7 +81,26 @@ public class IllegalInstantiationCheck
TokenTypes.PACKAGE_DEF
};
}
/**
* Prevent user from changing tokens in the configuration.
* @see com.puppycrawl.tools.checkstyle.api.Check
*/
public int[] getAcceptableTokens()
{
return new int[] {};
}
/** @see com.puppycrawl.tools.checkstyle.api.Check */
public int[] getRequiredTokens()
{
return new int[] {
TokenTypes.IMPORT,
TokenTypes.LITERAL_NEW,
TokenTypes.PACKAGE_DEF
};
}
/** @see com.puppycrawl.tools.checkstyle.api.Check */
public void beginTree()
{