public interface RefMethod extends RefJavaElement
EMPTY_ELEMENTS_ARRAY
Modifier and Type | Method and Description |
---|---|
java.util.Collection<RefMethod> |
getDerivedMethods()
Returns the collection of the overriding methods of this method in the
analysis scope.
|
default PsiModifierListOwner |
getElement()
Deprecated.
|
RefClass |
getOwnerClass()
Returns the class to which the method belongs.
|
RefParameter [] |
getParameters()
Returns the list of reference graph nodes for the method parameters.
|
java.lang.String |
getReturnValueIfSame()
If the method always returns the same value, returns that value (the name of a static
final field or the text of a literal expression).
|
java.util.Collection<RefMethod> |
getSuperMethods()
Returns the collection of the direct super methods of this method in the
analysis scope.
|
default UDeclaration |
getUastElement() |
PsiClass [] |
getUnThrownExceptions()
Returns the list of exceptions which are included in the
throws list
of the method but cannot be actually thrown. |
boolean |
hasBody()
Checks if this method has a body (that is, not a method of an interface or an abstract
method).
|
boolean |
hasSuperMethods()
Checks if the method has super methods either in the analysis scope or outside of it.
|
boolean |
isAbstract()
Checks if the method is abstract.
|
boolean |
isAppMain()
Checks if the signature of the method matches the signature of the standard
main
or premain method. |
boolean |
isBodyEmpty()
Checks if the method has no body or its body contains no statements besides
(possibly) a call to its super method.
|
boolean |
isCalledOnSubClass() |
boolean |
isConstructor()
Checks if the method is a constructor.
|
boolean |
isExternalOverride()
Checks if the method overrides a method outside the current analysis scope.
|
boolean |
isOnlyCallsSuper()
Checks if the method has a body which consists only of the call to its super method.
|
boolean |
isReturnValueUsed()
Checks if the return value of the method is used by any of its callers.
|
boolean |
isTestMethod()
Checks if the method is a test method in a testcase class.
|
getAccessModifier, getOutTypeReferences, getPsiElement, isFinal, isStatic, isSyntheticJSP
getContainingEntry, getInReferences, getModule, getOutReferences, getPointer, isEntry, isPermanentEntry, isReachable, isReferenced
accept, getChildren, getExternalName, getIcon, getName, getOwner, getQualifiedName, getRefManager, isValid
getUserData, putUserData
java.util.Collection<RefMethod> getSuperMethods()
PsiMethod.findSuperMethods()
,
hasSuperMethods()
java.util.Collection<RefMethod> getDerivedMethods()
boolean hasBody()
boolean isBodyEmpty()
boolean isOnlyCallsSuper()
boolean isTestMethod()
boolean isAppMain()
main
or premain
method.boolean hasSuperMethods()
getSuperMethods()
boolean isExternalOverride()
boolean isConstructor()
boolean isAbstract()
boolean isReturnValueUsed()
java.lang.String getReturnValueIfSame()
PsiClass [] getUnThrownExceptions()
throws
list
of the method but cannot be actually thrown.
To return valid results, requires com.intellij.codeInspection.unneededThrows.RedundantThrowsGraphAnnotator.
(Dbl) Annotator registration is possible in InspectionProfileEntry.initialize(com.intellij.codeInspection.GlobalInspectionContext)
or GlobalInspectionTool.getAnnotator(RefManager)
RefParameter [] getParameters()
RefClass getOwnerClass()
@Deprecated default PsiModifierListOwner getElement()
getElement
in interface RefElement
getElement
in interface RefJavaElement
default UDeclaration getUastElement()
getUastElement
in interface RefJavaElement
boolean isCalledOnSubClass()