public interface ApiUsageProcessor
ApiUsageUastVisitor.| Modifier and Type | Method and Description |
|---|---|
default 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. |
default void |
processImportReference(UElement sourceNode,
PsiModifierListOwner target)
Process reference to an imported API element.
|
default void |
processJavaModuleReference(PsiJavaModuleReference javaModuleReference,
PsiJavaModule target)
Process reference to a Java module found in
module-info.java file. |
default void |
processMethodOverriding(UMethod method,
PsiMethod overriddenMethod)
Process overriding of a super class' method.
|
default 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.
|
default void processReference(UElement sourceNode,
PsiModifierListOwner target,
UExpression qualifier)
sourceNode - can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsitarget - resolved API elementqualifier - is optionally a qualified expression of the reference.default void processImportReference(UElement sourceNode,
PsiModifierListOwner target)
sourceNode - can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsitarget - resolved API element being importeddefault void processConstructorInvocation(UElement sourceNode,
PsiClass instantiatedClass,
PsiMethod constructor,
UClass subclassDeclaration)
super() invocation in subclass' constructor, etc.sourceNode - can be used to get actual PSI element to highlight in inspections via sourceNode.sourcePsiinstantiatedClass - 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.default void processMethodOverriding(UMethod method,
PsiMethod overriddenMethod)
method - method that overrides the parent's method. method.uastAnchor.sourcePsi can be be used to highlight name declaration.overriddenMethod - super class' method being overriddendefault void processJavaModuleReference(PsiJavaModuleReference javaModuleReference, PsiJavaModule target)
module-info.java file.javaModuleReference - Java module referencetarget - resolved Java module