com.atlassian.clover.api.registry
Interface ClassInfo

All Superinterfaces:
EntityContainer, HasAggregatedMetrics, HasClasses, HasContextFilter, HasMethods, HasMetrics, HasParent, HasStatements, SourceInfo

public interface ClassInfo
extends SourceInfo, EntityContainer, HasClasses, HasMethods, HasStatements, HasContextFilter, HasMetrics, HasAggregatedMetrics, HasParent

Represents a single class or it's equivalent (an interface, trait etc). Implemented interfaces:


Method Summary
 java.util.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.
 java.util.List<? extends MethodInfo> getMethods()
          Returns list of methods declared on the top level of the class.
 ModifiersInfo getModifiers()
           
 java.lang.String getName()
           
 PackageInfo getPackage()
           
 java.lang.String getQualifiedName()
           
 java.util.List<? extends StatementInfo> getStatements()
          Returns list of statements declared on the to level of the class, i.e. outside methods.
 boolean isEmpty()
          Returns true if this class does not contain any nested entities (method or inner classes)
 boolean isTestClass()
           
 
Methods inherited from interface com.atlassian.clover.api.registry.SourceInfo
getEndColumn, getEndLine, getStartColumn, getStartLine
 
Methods inherited from interface com.atlassian.clover.api.registry.EntityContainer
visit
 
Methods inherited from interface com.atlassian.clover.api.registry.HasClasses
getAllClasses
 
Methods inherited from interface com.atlassian.clover.api.registry.HasMethods
getAllMethods
 
Methods inherited from interface com.atlassian.clover.api.registry.HasContextFilter
getContextFilter
 
Methods inherited from interface com.atlassian.clover.api.registry.HasMetrics
getMetrics, getRawMetrics, setMetrics
 
Methods inherited from interface com.atlassian.clover.api.registry.HasAggregatedMetrics
getAggregatedComplexity, getAggregatedStatementCount, setAggregatedComplexity, setAggregatedStatementCount
 
Methods inherited from interface com.atlassian.clover.api.registry.HasParent
getParent
 

Method Detail

getName

java.lang.String getName()
Specified by:
getName in interface HasMetrics

getQualifiedName

java.lang.String getQualifiedName()

getModifiers

ModifiersInfo getModifiers()

getContainingClass

@Nullable
ClassInfo getContainingClass()
Returns a class in which this class is declared (case for inner classes) or null otherwise.

Returns:
ClassInfo containing class or null

getContainingMethod

@Nullable
MethodInfo getContainingMethod()
Returns a method in which this class (an anonymous inline class for instance) is declared or null otherwise.

Returns:
MethodInfo containing method or null

getContainingFile

@Nullable
FileInfo getContainingFile()
Returns a file in which this class is declared.

Returns:
FileInfo file containing this class

isTestClass

boolean isTestClass()

getClasses

@NotNull
java.util.List<? extends ClassInfo> getClasses()
Returns list of inner classes declared on the top level of the class. It does not return classes declared inside other inner classes, i.e nested more than one level. Exact content depends on a programming language, e.g.:

Specified by:
getClasses in interface HasClasses
Returns:
List<? extends ClassInfo> - list of classes or empty list if none

getMethods

@NotNull
java.util.List<? extends MethodInfo> getMethods()
Returns list of methods declared on the top level of the class. It does not return methods declared in nested classes or methods declared inside other methods etc. Exact content depends on a programming language, e.g.:

Specified by:
getMethods in interface HasMethods
Returns:
List<? extends MethodInfo> - list of methods or empty list if none

getStatements

@NotNull
java.util.List<? extends StatementInfo> getStatements()
Returns list of statements declared on the to level of the class, i.e. outside methods. It does not apply to all programming languages:

Specified by:
getStatements in interface HasStatements
Returns:
List<? extends StatementInfo> - list of statements or empty list if none

isEmpty

boolean isEmpty()
Returns true if this class does not contain any nested entities (method or inner classes)

Returns:
boolean - true if getMethods() is empty and getClasses() is empty

getPackage

PackageInfo getPackage()