com.atlassian.clover.api.registry
Interface PackageInfo

All Superinterfaces:
EntityContainer, HasClasses, HasContextFilter, HasFiles, HasMetrics, HasParent

public interface PackageInfo
extends EntityContainer, HasClasses, HasFiles, HasContextFilter, HasMetrics, HasParent

Implemented interfaces:


Field Summary
static java.lang.String DEFAULT_PACKAGE_NAME
           
 
Method Summary
 java.util.List<? extends ClassInfo> getAllClasses()
          Returns list of all classes (including inner or inline classes) declared in this package.
 java.util.List<? extends ClassInfo> getAllClassesIncludingSubPackages()
          Returns list of all classes (including inner or inline classes) declared in this package AND all sub-packages.
 java.util.List<? extends ClassInfo> getClasses()
          Returns a list of top-level classes (i.e. declared on a file's top-level, not as inner classes or inline ones) declared in this package.
 java.util.List<? extends ClassInfo> getClassesIncludingSubPackages()
          Returns a list of top-level classes (i.e. not inner or inline ones) declared in this package AND all sub-packages.
 ProjectInfo getContainingProject()
          Returns a project containing this package.
 java.util.List<? extends FileInfo> getFiles()
          Returns list of source files belonging to this package namespace.
 java.lang.String getName()
           
 EntityContainer getParent()
          Returns a project containing this package EntityVisitor.visitProject(ProjectInfo).
 java.lang.String getPath()
           
 boolean isDefault()
           
 boolean isDescendantOf(PackageInfo other)
           
 boolean isEmpty()
           
 
Methods inherited from interface com.atlassian.clover.api.registry.EntityContainer
visit
 
Methods inherited from interface com.atlassian.clover.api.registry.HasContextFilter
getContextFilter
 
Methods inherited from interface com.atlassian.clover.api.registry.HasMetrics
getMetrics, getRawMetrics, setMetrics
 

Field Detail

DEFAULT_PACKAGE_NAME

static final java.lang.String DEFAULT_PACKAGE_NAME
See Also:
Constant Field Values
Method Detail

getParent

EntityContainer getParent()
Returns a project containing this package EntityVisitor.visitProject(ProjectInfo).

Specified by:
getParent in interface HasParent
Returns:
parent

getContainingProject

ProjectInfo getContainingProject()
Returns a project containing this package.

Returns:
parent ProjectInfo

getName

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

getPath

java.lang.String getPath()

isDefault

boolean isDefault()

isEmpty

boolean isEmpty()

getFiles

@NotNull
java.util.List<? extends FileInfo> getFiles()
Returns list of source files belonging to this package namespace.

Specified by:
getFiles in interface HasFiles
Returns:
List<? extends FileInfo> list of files or empty list if none

getClasses

@NotNull
java.util.List<? extends ClassInfo> getClasses()
Returns a list of top-level classes (i.e. declared on a file's top-level, not as inner classes or inline ones) declared in this package. It does not return classes from sub-packages. Note that in many programming languages you can have more than one class in a source file. It can also happen that some source file has no classes.

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

getClassesIncludingSubPackages

@NotNull
java.util.List<? extends ClassInfo> getClassesIncludingSubPackages()
Returns a list of top-level classes (i.e. not inner or inline ones) declared in this package AND all sub-packages. For example, if this package is named "com.acme" then it will return all top-level classes from "com.acme" as well as from "com.acme.foo", "com.acme.foo.bar" but not "com.other".

Returns:
List<? extends ClassInfo> list of classes or empty list if none

getAllClasses

@NotNull
java.util.List<? extends ClassInfo> getAllClasses()
Returns list of all classes (including inner or inline classes) declared in this package.

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

getAllClassesIncludingSubPackages

@NotNull
java.util.List<? extends ClassInfo> getAllClassesIncludingSubPackages()
Returns list of all classes (including inner or inline classes) declared in this package AND all sub-packages. For example if this package is named "com.acme" then it will return all top-level and inner classes from "com.acme" as well as from "com.acme.foo", "com.acme.foo.bar" but not from "com.other".

Returns:
List<? extends ClassInfo> - list of classes or empty list if none

isDescendantOf

boolean isDescendantOf(PackageInfo other)