public final class DeprecatedApiUsageProcessor extends java.lang.Object implements ApiUsageProcessor
@Deprecated, @ScheduledForRemoval
annotations or @deprecated
Javadoc tag.Constructor and Description |
---|
DeprecatedApiUsageProcessor(ProblemsHolder holder,
boolean ignoreInsideDeprecated,
boolean ignoreAbstractDeprecatedOverrides,
boolean ignoreImportStatements,
boolean ignoreMethodsOfDeprecated,
boolean ignoreInSameOutermostClass,
boolean forRemoval,
HighlightSeverity severity) |
Modifier and Type | Method and Description |
---|---|
void |
processConstructorInvocation(UElement sourceNode,
PsiClass instantiatedClass,
PsiMethod constructor,
UClass subclassDeclaration)
Process constructor invocation of a class.
The invoked constructor may be the default constructor, which is not declared in source code. The constructor invocation may be implicit: in declaration of a subclass with no constructors defined, in declaration of an anonymous class, as implicit super() invocation in subclass' constructor, etc. |
void |
processImportReference(UElement sourceNode,
PsiModifierListOwner target)
Process reference to an imported API element.
|
void |
processJavaModuleReference(PsiJavaModuleReference javaModuleReference,
PsiJavaModule target)
Process reference to a Java module found in
module-info.java file. |
void |
processMethodOverriding(UMethod method,
PsiMethod overriddenMethod)
Process overriding of a super class' method.
|
void |
processReference(UElement sourceNode,
PsiModifierListOwner target,
UExpression qualifier)
Process reference to a class, method (not constructor), field or any other API element found in source code.
|
public DeprecatedApiUsageProcessor(ProblemsHolder holder, boolean ignoreInsideDeprecated, boolean ignoreAbstractDeprecatedOverrides, boolean ignoreImportStatements, boolean ignoreMethodsOfDeprecated, boolean ignoreInSameOutermostClass, boolean forRemoval, HighlightSeverity severity)
public void processReference(UElement sourceNode, PsiModifierListOwner target, UExpression qualifier)
ApiUsageProcessor
processReference
in interface ApiUsageProcessor
sourceNode
- can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsi
target
- resolved API elementqualifier
- is optionally a qualified expression of the reference.public void processImportReference(UElement sourceNode, PsiModifierListOwner target)
ApiUsageProcessor
processImportReference
in interface ApiUsageProcessor
sourceNode
- can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsi
target
- resolved API element being importedpublic void processConstructorInvocation(UElement sourceNode, PsiClass instantiatedClass, PsiMethod constructor, UClass subclassDeclaration)
ApiUsageProcessor
super()
invocation in subclass' constructor, etc.processConstructorInvocation
in interface ApiUsageProcessor
sourceNode
- can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsi
instantiatedClass
- class being instantiatedconstructor
- PSI constructor defined in source code, or null
if the default constructor is being invoked.subclassDeclaration
- declaration of a subclass or anonymous subclass where the constructor invocation's happens,
or null
if the constructor is being invoked explicitly.public void processMethodOverriding(UMethod method, PsiMethod overriddenMethod)
ApiUsageProcessor
processMethodOverriding
in interface ApiUsageProcessor
method
- method that overrides the parent's method. method.uastAnchor.sourcePsi
can be be used to highlight name declaration.overriddenMethod
- super class' method being overriddenpublic void processJavaModuleReference(PsiJavaModuleReference javaModuleReference, PsiJavaModule target)
ApiUsageProcessor
module-info.java
file.processJavaModuleReference
in interface ApiUsageProcessor
javaModuleReference
- Java module referencetarget
- resolved Java module