@NotThreadSafe public class PackageMetrics extends CodeElementMetrics
Instances of this class are not safe for use by multiple threads without external synchronization.
| Constructor | Description |
|---|---|
PackageMetrics(java.lang.String pName) |
Create a new
PackageMetrics. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(CompilationUnitMetrics pCompilationUnit) |
Add metrics for a compilation unit to this instance.
|
java.lang.Iterable<CompilationUnitMetrics> |
getCompilationUnits() |
Get an
Iterable that iterates over the metrics for each compilation unit belonging to
the package. |
int |
getNumCompilationUnits() |
Get the number of compilation units that declare this package.
|
getComments, getNamepublic PackageMetrics(@Nonnull
java.lang.String pName)
PackageMetrics.pName - The name of the package.java.lang.NullPointerException - if pName is null.public int getNumCompilationUnits()
@Nonnull public java.lang.Iterable<CompilationUnitMetrics> getCompilationUnits()
Iterable that iterates over the metrics for each compilation unit belonging to
the package.Iterable for the compilation units' metrics, never null.public void add(@Nonnull
CompilationUnitMetrics pCompilationUnit)
pCompilationUnit - The compilation unit metrics.java.lang.NullPointerException - if pCompilationUnit is null.