public class LocationReferenceCheck extends AbstractMethodCallCheck
| Constructor and Description |
|---|
LocationReferenceCheck() |
| Modifier and Type | Method and Description |
|---|---|
Set<Integer> |
getRelevantTokens()
The tokens which this check is interested in.
|
protected boolean |
isCheckActive()
Determines if the check is configured to do anything at all.
|
protected boolean |
isRelevantCall(String pQualifier,
String pMethodName)
Filter method which determines if the given method call is considered relevant.
|
void |
setArgumentPosition(int pArgumentPosition) |
void |
setLocation(String pLocation) |
void |
setMethodCalls(String... pMethodCalls)
Setter.
|
void |
setVariableNames(String... pVariableNames)
Setter.
|
protected void |
visitMethodCall(String pMethodName,
DetailAST pMethodCallAst)
Visitor method called when a relevant method call is encountered.
|
protected void |
visitToken(BinaryName pBinaryClassName,
DetailAST pAst)
Called to process a token.
|
beginTree, getCurrentMethodName, leaveTokenfinishTree, finishTree, getApiFixer, getClassDeclarationPosition, getCurrentBinaryName, getCurrentSimpleName, getDefaultTokens, getMyPackage, getRequiredTokens, leaveKnownType, leaveToken, visitKnownType, visitTokendestroy, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic Set<Integer> getRelevantTokens()
AbstractAddonsCheckgetRelevantTokens in class AbstractMethodCallCheckprotected boolean isCheckActive()
AbstractMethodCallCheckisCheckActive in class AbstractMethodCallChecktrue if processing should be performedprotected boolean isRelevantCall(@Nullable String pQualifier, @Nonnull String pMethodName)
AbstractMethodCallCheckisRelevantCall in class AbstractMethodCallCheckpQualifier - the qualifier of the method call (for a call like Foo.Bar.call(), the
qualifier is Foo.Bar)pMethodName - the simple name of the called methodtrue) or not (false)public void setArgumentPosition(int pArgumentPosition)
public void setLocation(String pLocation)
public void setMethodCalls(String... pMethodCalls)
pMethodCalls - list of qualified method calls to coverpublic void setVariableNames(String... pVariableNames)
pVariableNames - list of variable names to coverprotected void visitMethodCall(@Nonnull String pMethodName, @Nonnull DetailAST pMethodCallAst)
AbstractMethodCallCheckvisitMethodCall in class AbstractMethodCallCheckpMethodName - the simple name of the called methodpMethodCallAst - AST of the call, useful for logging issues ( this is a METHOD_DEF, CTOR_CALL, or a
SUPER_CTOR_CALL token)protected void visitToken(@Nullable BinaryName pBinaryClassName, @Nonnull DetailAST pAst)
AbstractAddonsCheckvisitToken in class AbstractMethodCallCheckpBinaryClassName - the currently active binary class namepAst - the token to process