public class FullClassInfo extends BaseClassInfo implements HasMetricsNode, CoverageDataReceptor, TaggedPersistent, ClassInfo
contextFilter, metrics, modifiers, name, packageInfo, qualifiedName, rawMetrics, testClass, typeAnnotation, typeEnum, typeInterfacecontainingFile, region| Constructor and Description |
|---|
FullClassInfo(FullPackageInfo packageInfo,
FullClassInfo parentClass,
int dataIndex,
String name,
SourceInfo region,
Modifiers modifiers,
boolean typeInterface,
boolean typeEnum,
boolean typeAnnotation) |
FullClassInfo(FullPackageInfo packageInfo,
FullFileInfo parentFile,
int dataIndex,
String name,
SourceInfo region,
Modifiers modifiers,
boolean typeInterface,
boolean typeEnum,
boolean typeAnnotation) |
FullClassInfo(FullPackageInfo packageInfo,
FullMethodInfo parentMethod,
int dataIndex,
String name,
SourceInfo region,
Modifiers modifiers,
boolean typeInterface,
boolean typeEnum,
boolean typeAnnotation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClass(FullClassInfo classInfo) |
void |
addMethod(FullMethodInfo meth) |
void |
addStatement(FullStatementInfo statement) |
void |
addTestCase(TestCaseInfo tci) |
FullClassInfo |
copy(FullFileInfo newParent,
HasMetricsFilter filter) |
void |
gatherSourceRegions(Set<SourceInfo> regions) |
int |
getAggregatedComplexity() |
int |
getAggregatedStatementCount() |
List<? extends ClassInfo> |
getAllClasses()
Returns list of all classes, including indirect descendants.
|
List<? extends MethodInfo> |
getAllMethods()
Returns list of all methods, including indirect descendants.
|
HasMetricsNode |
getChild(int i) |
String |
getChildType() |
List<? extends ClassInfo> |
getClasses()
Returns list of inner classes declared on the top level of the class.
|
ClassInfo |
getContainingClass()
Returns a class in which this class is declared (case for inner classes) or
null otherwise. |
FileInfo |
getContainingFile()
Returns a file in which this class is declared.
|
MethodInfo |
getContainingMethod()
Returns a method in which this class (an anonymous inline class for instance) is declared or
null
otherwise. |
int |
getDataIndex() |
int |
getDataLength() |
CoverageDataProvider |
getDataProvider() |
int |
getIndexOfChild(HasMetricsNode child) |
List<? extends MethodInfo> |
getMethods()
Returns list of methods declared on the top level of the class.
|
BlockMetrics |
getMetrics() |
int |
getNumChildren() |
int |
getNumMethods() |
EntityContainer |
getParent() |
BlockMetrics |
getRawMetrics() |
int |
getRelativeDataIndex() |
List<? extends StatementInfo> |
getStatements()
Returns list of statements declared on the to level of the class, i.e.
|
TestCaseInfo |
getTestCase(Integer id)
Gets the runtime testcase for the given id of this class.
|
TestCaseInfo |
getTestCase(String testname) |
Collection<TestCaseInfo> |
getTestCases() |
FullMethodInfo |
getTestMethodDeclaration(String methodname)
find a method decl from its name
at the moment this method just returns the first method that has the requested name, or null
|
void |
increaseAggregatedComplexity(int increment) |
void |
increaseAggregatedStatements(int increment) |
boolean |
isEmpty()
Returns true if this class does not contain any nested entities (method or inner classes)
|
boolean |
isLeaf() |
static FullClassInfo |
read(TaggedDataInput in) |
void |
setAggregatedComplexity(int aggregatedComplexity) |
void |
setAggregatedStatementCount(int aggregatedStatements) |
void |
setComparator(Comparator cmp) |
void |
setContainingClass(FullClassInfo containingClass) |
void |
setContainingFile(FullFileInfo fileInfo) |
void |
setContainingMethod(FullMethodInfo containingMethod) |
void |
setDataLength(int length) |
void |
setDataProvider(CoverageDataProvider data) |
void |
setRegionEnd(int endLine,
int endCol) |
void |
visitElements(FileElementVisitor visitor) |
void |
write(TaggedDataOutput out) |
getContextFilter, getModifiers, getName, getPackage, getQualifiedName, isAnnotationType, isEnum, isInterface, isTestClass, setMetrics, toString, visitgetEndColumn, getEndLine, getStartColumn, getStartLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetModifiers, getName, getPackage, getQualifiedName, isTestClassgetEndColumn, getEndLine, getStartColumn, getStartLinevisitgetContextFiltersetMetricspublic FullClassInfo(FullPackageInfo packageInfo, FullClassInfo parentClass, int dataIndex, String name, SourceInfo region, Modifiers modifiers, boolean typeInterface, boolean typeEnum, boolean typeAnnotation)
public FullClassInfo(FullPackageInfo packageInfo, FullMethodInfo parentMethod, int dataIndex, String name, SourceInfo region, Modifiers modifiers, boolean typeInterface, boolean typeEnum, boolean typeAnnotation)
public FullClassInfo(FullPackageInfo packageInfo, FullFileInfo parentFile, int dataIndex, String name, SourceInfo region, Modifiers modifiers, boolean typeInterface, boolean typeEnum, boolean typeAnnotation)
public boolean isEmpty()
ClassInfoisEmpty in interface ClassInfoisEmpty in interface HasMetricsNodeisEmpty in class BaseClassInfo@NotNull public List<? extends ClassInfo> getClasses()
ClassInfogetClasses in interface ClassInfogetClasses in interface HasClassesgetClasses in class BaseClassInfo@NotNull public List<? extends ClassInfo> getAllClasses()
HasClassesgetAllClasses in interface HasClassesgetAllClasses in class BaseClassInfo@NotNull public List<? extends MethodInfo> getMethods()
ClassInfogetMethods in interface ClassInfogetMethods in interface HasMethodsgetMethods in class BaseClassInfo@NotNull public List<? extends MethodInfo> getAllMethods()
HasMethodsgetAllMethods in interface HasMethodsgetAllMethods in class BaseClassInfo@NotNull public List<? extends StatementInfo> getStatements()
ClassInfogetStatements in interface ClassInfogetStatements in interface HasStatementsgetStatements in class BaseClassInfopublic void addClass(FullClassInfo classInfo)
public void addMethod(FullMethodInfo meth)
public void addStatement(FullStatementInfo statement)
public void addTestCase(TestCaseInfo tci)
public Collection<TestCaseInfo> getTestCases()
public TestCaseInfo getTestCase(Integer id)
id - numeric identifier of the test casenullif not found
public TestCaseInfo getTestCase(String testname)
testname - - fully qualified test name e.g. com.foo.bar.BarTest.testFoopublic void setDataProvider(CoverageDataProvider data)
setDataProvider in interface CoverageDataReceptorpublic CoverageDataProvider getDataProvider()
getDataProvider in interface CoverageDataReceptorpublic int getDataIndex()
getDataIndex in interface CoverageDataRangepublic int getRelativeDataIndex()
public int getDataLength()
getDataLength in interface CoverageDataRangepublic void setDataLength(int length)
public int getAggregatedStatementCount()
getAggregatedStatementCount in interface HasAggregatedMetricsgetAggregatedStatementCount in class BaseClassInfopublic void setAggregatedStatementCount(int aggregatedStatements)
setAggregatedStatementCount in interface HasAggregatedMetricssetAggregatedStatementCount in class BaseClassInfopublic void increaseAggregatedStatements(int increment)
public int getAggregatedComplexity()
getAggregatedComplexity in interface HasAggregatedMetricsgetAggregatedComplexity in class BaseClassInfopublic void setAggregatedComplexity(int aggregatedComplexity)
setAggregatedComplexity in interface HasAggregatedMetricssetAggregatedComplexity in class BaseClassInfopublic void increaseAggregatedComplexity(int increment)
@Nullable public MethodInfo getContainingMethod()
ClassInfonull
otherwise.getContainingMethod in interface ClassInfogetContainingMethod in class BaseClassInfonull@Nullable public ClassInfo getContainingClass()
ClassInfonull otherwise.getContainingClass in interface ClassInfogetContainingClass in class BaseClassInfonull@Nullable public FileInfo getContainingFile()
ClassInfogetContainingFile in interface ClassInfogetContainingFile in interface FileInfoRegiongetContainingFile in class BaseClassInfopublic EntityContainer getParent()
getParent in interface HasParentgetParent in class BaseClassInfopublic void gatherSourceRegions(Set<SourceInfo> regions)
public void visitElements(FileElementVisitor visitor)
public String getChildType()
getChildType in interface HasMetricsNodepublic int getNumChildren()
getNumChildren in interface HasMetricsNodepublic HasMetricsNode getChild(int i)
getChild in interface HasMetricsNodepublic int getIndexOfChild(HasMetricsNode child)
getIndexOfChild in interface HasMetricsNodepublic boolean isLeaf()
isLeaf in interface HasMetricsNodepublic void setComparator(Comparator cmp)
setComparator in interface HasMetricsNodepublic BlockMetrics getMetrics()
getMetrics in interface HasMetricsgetMetrics in class BaseClassInfopublic BlockMetrics getRawMetrics()
getRawMetrics in interface HasMetricsgetRawMetrics in class BaseClassInfopublic FullClassInfo copy(FullFileInfo newParent, HasMetricsFilter filter)
public FullMethodInfo getTestMethodDeclaration(String methodname)
public int getNumMethods()
public void setRegionEnd(int endLine,
int endCol)
public void setContainingMethod(FullMethodInfo containingMethod)
public void setContainingClass(FullClassInfo containingClass)
public void setContainingFile(FullFileInfo fileInfo)
public void write(TaggedDataOutput out) throws IOException
write in interface TaggedPersistentIOExceptionpublic static FullClassInfo read(TaggedDataInput in) throws IOException
IOExceptionCopyright © 2024 OpenClover.org. All rights reserved.