public abstract class AvoidObjectComparisonWithSelfCheckBase extends EntityCheckBase
context| Constructor and Description |
|---|
AvoidObjectComparisonWithSelfCheckBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.List<java.lang.Integer> |
getIndicesOfComparisonExpression(java.util.List<IToken> tokens)
Returns list of start indices of comparison expressions in entity tokens.
|
protected abstract int |
getSecondOperandIndex(int operatorIndex)
Returns index of the second operand of comparison expression.
|
protected java.lang.String |
getXPathSelectionString()
Returns the xPath string for selecting entities.
|
protected boolean |
isRuleException(IToken operand)
Template method that can return true, if the given operand is an exception
from the rule.
|
protected void |
processEntity(ShallowEntity entity)
Processes a single selected entity.
|
execute, filterEntitiescreateFinding, createFinding, createFinding, createFinding, createFinding, createFinding, createFinding, createFindingForSiblingEntities, createFindingForSiblings, createFindingOnFirstLine, createFindingOnUnfilteredCode, createFindingOnUnfilteredCode, createFindingOnUnfilteredCode, createInstance, createSelectionPattern, getCodeViewOption, initialize, isCpp, select, select, selectUnfilteredPreProcessed, setContextpublic AvoidObjectComparisonWithSelfCheckBase()
protected java.lang.String getXPathSelectionString()
getXPathSelectionString in class EntityCheckBaseprotected void processEntity(ShallowEntity entity) throws CheckException
processEntity in class EntityCheckBaseCheckExceptionprotected boolean isRuleException(IToken operand)
operand - the operand to be checked for exception case.protected abstract java.util.List<java.lang.Integer> getIndicesOfComparisonExpression(java.util.List<IToken> tokens)
protected abstract int getSecondOperandIndex(int operatorIndex)