public abstract class DataFlowInspectionBase extends AbstractBaseJavaLocalInspectionTool
Modifier and Type | Class and Description |
---|---|
protected static class |
DataFlowInspectionBase.ConstantResult |
protected static class |
DataFlowInspectionBase.ProblemReporter
ProblemsHolder wrapper to avoid reporting two problems on the same anchor |
Modifier and Type | Field and Description |
---|---|
boolean |
DONT_REPORT_TRUE_ASSERT_STATEMENTS |
boolean |
IGNORE_ASSERT_STATEMENTS |
boolean |
REPORT_CONSTANT_REFERENCE_VALUES |
boolean |
REPORT_NULLABLE_METHODS_RETURNING_NOT_NULL |
boolean |
REPORT_NULLS_PASSED_TO_NOT_NULL_PARAMETER |
boolean |
REPORT_UNSOUND_WARNINGS |
boolean |
SUGGEST_NULLABLE_ANNOTATIONS |
boolean |
TREAT_UNKNOWN_MEMBERS_AS_NULLABLE |
EMPTY_ARRAY, VALID_ID_PATTERN
myNameProvider
Constructor and Description |
---|
DataFlowInspectionBase() |
checkClass, checkField, checkMethod
buildVisitor, checkFile, getAlternativeID, getID, getProblemElement, getSuppressId, inspectionFinished, inspectionFinished, inspectionStarted, isValidID, processFile, runForWholeFile
cleanup, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isEnabledByDefault, isInitialized, isSuppressedFor, loadDescription, readSettings, showDefaultConfigurationOptions
public boolean SUGGEST_NULLABLE_ANNOTATIONS
public boolean DONT_REPORT_TRUE_ASSERT_STATEMENTS
public boolean TREAT_UNKNOWN_MEMBERS_AS_NULLABLE
public boolean IGNORE_ASSERT_STATEMENTS
public boolean REPORT_CONSTANT_REFERENCE_VALUES
public boolean REPORT_NULLS_PASSED_TO_NOT_NULL_PARAMETER
public boolean REPORT_NULLABLE_METHODS_RETURNING_NOT_NULL
public boolean REPORT_UNSOUND_WARNINGS
public javax.swing.JComponent createOptionsPanel()
InspectionProfileEntry
createOptionsPanel
in class InspectionProfileEntry
null
if no UI options required.public void writeSettings(Element node) throws WriteExternalException
InspectionProfileEntry
int TOOL_OPTION
)
and bean-style getters/setters (like int getToolOption(), void setToolOption(int)
) to store your options.writeSettings
in class InspectionProfileEntry
node
- to store settings to.WriteExternalException
public PsiElementVisitor buildVisitor(ProblemsHolder holder, boolean isOnTheFly)
LocalInspectionTool
PsiRecursiveElementVisitor
)
since it will be fed with every element in the file anyway.
Visitor created must be thread-safe since it might be called on several elements concurrently.buildVisitor
in class AbstractBaseJavaLocalInspectionTool
holder
- where visitor will register problems found.isOnTheFly
- true if inspection was run in non-batch modePsiRecursiveVisitor
protected LocalQuickFix createNavigateToNullParameterUsagesFix(PsiParameter parameter)
protected java.util.List<LocalQuickFix> createCastFixes(PsiTypeCastExpression castExpression, PsiType realType, boolean onTheFly, boolean alwaysFails)
protected java.util.List<LocalQuickFix> createNPEFixes(PsiExpression qualifier, PsiExpression expression, boolean onTheFly)
protected java.util.List<LocalQuickFix> createMethodReferenceNPEFixes(PsiMethodReferenceExpression methodRef, boolean onTheFly)
protected LocalQuickFix createUnwrapSwitchLabelFix()
protected LocalQuickFix createIntroduceVariableFix()
protected LocalQuickFix createRemoveAssignmentFix(PsiAssignmentExpression assignment)
protected LocalQuickFix createReplaceWithTrivialLambdaFix(java.lang.Object value)
protected LocalQuickFix createMutabilityViolationFix(PsiElement violation, boolean onTheFly)
protected void reportNullabilityProblems(DataFlowInspectionBase.ProblemReporter reporter, java.util.List<NullabilityProblemKind.NullabilityProblem<?>> problems, java.util.Map<PsiExpression,DataFlowInspectionBase.ConstantResult> expressions)
protected LocalQuickFix createExplainFix(PsiExpression anchor, TrackingRunner.DfaProblemType problemType)
protected LocalQuickFix[] createConditionalAssignmentFixes(boolean evaluatesToTrue, PsiAssignmentExpression parent, boolean onTheFly)
protected static LocalQuickFix createSimplifyToAssignmentFix()
protected LocalQuickFixOnPsiElement createSimplifyBooleanFix(PsiElement element, boolean value)
public java.lang.String getGroupDisplayName()
getGroupDisplayName
in class InspectionProfileEntry
InspectionEP.groupDisplayName
,
InspectionEP.groupKey
,
InspectionEP.groupBundle
public java.lang.String getShortName()
InspectionProfileEntry
getShortName
in class InspectionProfileEntry
InspectionEP.shortName