com.puppycrawl.tools.checkstyle.checks
Class AbstractImportCheck

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended bycom.puppycrawl.tools.checkstyle.api.Check
              extended bycom.puppycrawl.tools.checkstyle.checks.AbstractImportCheck
All Implemented Interfaces:
Configurable, Contextualizable
Direct Known Subclasses:
AvoidStarImportCheck, IllegalImportCheck, IllegalInstantiationCheck, JavadocMethodCheck, RedundantImportCheck, RedundantThrowsCheck, UnusedImportsCheck

public abstract class AbstractImportCheck
extends Check

Abstract class that provides helper functionality for determining an import name. It caches the import name in the token context to improve performance.

Version:
1.0
Author:
Oliver Burn

Constructor Summary
AbstractImportCheck()
           
 
Method Summary
protected  FullIdent getImportText(DetailAST aAST)
          Return the name of the import associated with a specifed DetailAST.
 
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, setSeverity
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractImportCheck

public AbstractImportCheck()
Method Detail

getImportText

protected FullIdent getImportText(DetailAST aAST)
Return the name of the import associated with a specifed DetailAST.

Parameters:
aAST - the node containing the import
Returns:
a String value

Back to the Checkstyle Home Page