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