com.puppycrawl.tools.checkstyle.checks.imports
Class RedundantImportCheck
- Configurable, Contextualizable
public class RedundantImportCheck
Checks for imports that are redundant. An import statement is
considered redundant if:
- It is a duplicate of another import. This is, when a class is imported
more than once.
- The class imported is from the
java.lang package.
For example importing java.lang.String.
- The class imported is from the same package.
An example of how to configure the check is:
<module name="RedundantImport"/>
Version:
- Oliver Burn
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken |
getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setSeverity |
getDefaultTokens
public int[] getDefaultTokens()
- getDefaultTokens in interface Check
Check