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_PATTERNmyNameProvider| Constructor and Description |
|---|
DataFlowInspectionBase() |
checkClass, checkField, checkMethodbuildVisitor, checkFile, getAlternativeID, getID, getProblemElement, getSuppressId, inspectionFinished, inspectionFinished, inspectionStarted, isValidID, processFile, runForWholeFilecleanup, getBatchSuppressActions, getBlackList, getDefaultLevel, getDescriptionContextClass, getDescriptionFileName, getDisplayName, getGeneralGroupName, getGroupKey, getGroupPath, getMainToolId, getSerializationFilter, getShortName, getStaticDescription, getSuppressors, initialize, isEnabledByDefault, isInitialized, isSuppressedFor, loadDescription, readSettings, showDefaultConfigurationOptionspublic 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()
InspectionProfileEntrycreateOptionsPanel in class InspectionProfileEntrynull if no UI options required.public void writeSettings(Element node)
throws WriteExternalException
InspectionProfileEntryint TOOL_OPTION)
and bean-style getters/setters (like int getToolOption(), void setToolOption(int)) to store your options.writeSettings in class InspectionProfileEntrynode - to store settings to.WriteExternalExceptionpublic PsiElementVisitor buildVisitor(ProblemsHolder holder, boolean isOnTheFly)
LocalInspectionToolPsiRecursiveElementVisitor)
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 AbstractBaseJavaLocalInspectionToolholder - where visitor will register problems found.isOnTheFly - true if inspection was run in non-batch modePsiRecursiveVisitorprotected 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 InspectionProfileEntryInspectionEP.groupDisplayName,
InspectionEP.groupKey,
InspectionEP.groupBundlepublic java.lang.String getShortName()
InspectionProfileEntrygetShortName in class InspectionProfileEntryInspectionEP.shortName