public interface MethodInfo extends ElementInfo, SourceInfo, InstrumentationInfo, EntityContainer, HasBranches, HasClasses, HasMethods, HasStatements, HasContextFilter, HasMetrics, HasAggregatedMetrics, HasParent
Modifier and Type | Method and Description |
---|---|
ClassInfo |
getContainingClass()
Returns a class in which method is declared or
null if method (actually it will be a function
or procedure) is declared outside the class. |
FileInfo |
getContainingFile()
Returns a file in which this method is declared.
|
MethodInfo |
getContainingMethod()
Returns a method in which this method (an inner function actually) is declared or
null if method
is not nested inside other method. |
java.lang.String |
getName() |
EntityContainer |
getParent()
Returns an object which encloses this method.
|
java.lang.String |
getQualifiedName() |
MethodSignatureInfo |
getSignature()
Returns method signature (annotations, keywords, type parameters, method name, parameters, return type, throws).
|
java.lang.String |
getSimpleName() |
java.lang.String |
getStaticTestName()
Name of the test associated with a method.
|
boolean |
isEmpty()
Returns whether method is empty, i.e.
|
boolean |
isLambda()
Returns whether it's a lambda function or not.
|
boolean |
isTest()
Returns whether it's a test method or not.
|
getComplexity, getContext, getHitCount
getEndColumn, getEndLine, getStartColumn, getStartLine
getDataIndex, getDataLength
visit
getBranches
getAllClasses, getClasses
getAllMethods, getMethods
getStatements
getContextFilter
getMetrics, getRawMetrics, setMetrics
getAggregatedComplexity, getAggregatedStatementCount, setAggregatedComplexity, setAggregatedStatementCount
java.lang.String getName()
getName
in interface HasMetrics
java.lang.String getSimpleName()
java.lang.String getQualifiedName()
@Nullable ClassInfo getContainingClass()
null
if method (actually it will be a function
or procedure) is declared outside the class.null
@Nullable MethodInfo getContainingMethod()
null
if method
is not nested inside other method.null
@Nullable FileInfo getContainingFile()
@NotNull EntityContainer getParent()
EntityVisitor.visitClass(ClassInfo)
- for a method declared inside a classEntityVisitor.visitMethod(MethodInfo)
- for a method declared inside another methodEntityVisitor.visitFile(FileInfo)
- for a method declared in the file (on a top-level)boolean isEmpty()
@NotNull MethodSignatureInfo getSignature()
boolean isTest()
@Nullable java.lang.String getStaticTestName()
null
if not declaredboolean isLambda()
true
for lambda function, false otherwise