public class BaseClassInfo extends FixedFileRegion implements ClassInfo
| Modifier and Type | Field and Description |
|---|---|
protected ContextSet |
contextFilter |
protected BlockMetrics |
metrics |
protected Modifiers |
modifiers
Class modifiers (like public, static) with class annotations
|
protected String |
name
Base class name
|
protected BasePackageInfo |
packageInfo |
protected String |
qualifiedName
Fully qualified class name
|
protected BlockMetrics |
rawMetrics |
protected boolean |
testClass
Whether this object is a test class (according to custom or default test detector
|
protected boolean |
typeAnnotation
Whether this object is an annotation
|
protected boolean |
typeEnum
Whether this object is an enum
|
protected boolean |
typeInterface
Whether this object is an interface
|
containingFile, region| Modifier | Constructor and Description |
|---|---|
|
BaseClassInfo(BasePackageInfo packageInfo,
BaseFileInfo containingFile,
String name,
SourceInfo region,
Modifiers modifiers,
boolean typeInterface,
boolean typeEnum,
boolean typeAnnotation) |
protected |
BaseClassInfo(String name,
String qualifiedName,
SourceInfo region,
Modifiers modifiers,
boolean typeInterface,
boolean typeEnum,
boolean typeAnnotation,
boolean testClass) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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. |
ContextSet |
getContextFilter()
Returns context filter for the entity, i.e set of custom statement/method contexts as well as Clover's built-in
code contexts.
|
List<? extends MethodInfo> |
getMethods()
Returns list of methods declared on the top level of the class.
|
BlockMetrics |
getMetrics() |
ModifiersInfo |
getModifiers() |
String |
getName() |
PackageInfo |
getPackage() |
EntityContainer |
getParent() |
String |
getQualifiedName() |
BlockMetrics |
getRawMetrics() |
List<? extends StatementInfo> |
getStatements()
Returns list of statements declared on the to level of the class, i.e.
|
boolean |
isAnnotationType() |
boolean |
isEmpty()
Returns true if this class does not contain any nested entities (method or inner classes)
|
boolean |
isEnum() |
boolean |
isInterface() |
boolean |
isTestClass() |
void |
setAggregatedComplexity(int aggregatedComplexity) |
void |
setAggregatedStatementCount(int aggregatedStatements) |
void |
setMetrics(BlockMetrics metrics) |
String |
toString() |
void |
visit(EntityVisitor entityVisitor)
Visit yourself
|
getEndColumn, getEndLine, getStartColumn, getStartLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEndColumn, getEndLine, getStartColumn, getStartLineprotected String name
protected String qualifiedName
protected Modifiers modifiers
protected boolean typeInterface
protected boolean typeEnum
protected boolean typeAnnotation
protected boolean testClass
protected transient BasePackageInfo packageInfo
protected transient BlockMetrics rawMetrics
protected transient BlockMetrics metrics
protected transient ContextSet contextFilter
public BaseClassInfo(BasePackageInfo packageInfo, BaseFileInfo containingFile, String name, SourceInfo region, Modifiers modifiers, boolean typeInterface, boolean typeEnum, boolean typeAnnotation)
protected BaseClassInfo(String name, String qualifiedName, SourceInfo region, Modifiers modifiers, boolean typeInterface, boolean typeEnum, boolean typeAnnotation, boolean testClass)
public String getName()
getName in interface ClassInfogetName in interface HasMetricspublic String getQualifiedName()
getQualifiedName in interface ClassInfopublic ModifiersInfo getModifiers()
getModifiers in interface ClassInfo@Nullable public ClassInfo getContainingClass()
ClassInfonull otherwise.getContainingClass in interface ClassInfonull@Nullable public MethodInfo getContainingMethod()
ClassInfonull
otherwise.getContainingMethod in interface ClassInfonull@Nullable public FileInfo getContainingFile()
ClassInfogetContainingFile in interface ClassInfogetContainingFile in interface FileInfoRegiongetContainingFile in class FixedFileRegionpublic EntityContainer getParent()
public PackageInfo getPackage()
getPackage in interface ClassInfopublic boolean isInterface()
public boolean isEnum()
public boolean isAnnotationType()
public BlockMetrics getRawMetrics()
getRawMetrics in interface HasMetricspublic BlockMetrics getMetrics()
getMetrics in interface HasMetricspublic void setMetrics(BlockMetrics metrics)
setMetrics in interface HasMetricspublic boolean isTestClass()
isTestClass in interface ClassInfo@NotNull public List<? extends ClassInfo> getClasses()
ClassInfogetClasses in interface ClassInfogetClasses in interface HasClasses@NotNull public List<? extends ClassInfo> getAllClasses()
HasClassesgetAllClasses in interface HasClasses@NotNull public List<? extends MethodInfo> getMethods()
ClassInfogetMethods in interface ClassInfogetMethods in interface HasMethods@NotNull public List<? extends MethodInfo> getAllMethods()
HasMethodsgetAllMethods in interface HasMethods@NotNull public List<? extends StatementInfo> getStatements()
ClassInfogetStatements in interface ClassInfogetStatements in interface HasStatementspublic boolean isEmpty()
ClassInfopublic ContextSet getContextFilter()
HasContextFiltergetContextFilter in interface HasContextFilterpublic int getAggregatedComplexity()
getAggregatedComplexity in interface HasAggregatedMetricspublic void setAggregatedComplexity(int aggregatedComplexity)
setAggregatedComplexity in interface HasAggregatedMetricspublic int getAggregatedStatementCount()
getAggregatedStatementCount in interface HasAggregatedMetricspublic void setAggregatedStatementCount(int aggregatedStatements)
setAggregatedStatementCount in interface HasAggregatedMetricspublic void visit(EntityVisitor entityVisitor)
visit in interface EntityContainerentityVisitor - callbackCopyright © 2024 OpenClover.org. All rights reserved.