Class MetricPackage
This class provides access to metrics information for packages.
Import path
import java
Direct supertypes
Predicates
countDependencies |
How many types in this package the specified reference type depends on. |
getACycleMember |
Cyclic package dependencies: a member of the cycle to which this package belongs. |
getADependency |
Gets a dependency of this element, for use with John Lakos’s “level metric”. |
getAbstractness |
Abstractness metric. |
getAfferentCoupling |
Afferent Coupling (incoming dependencies). |
getAverageFanIn |
Average Fan-In. |
getCycleSize |
Cyclic package dependencies: the size of the cycle to which this package belongs. |
getDistanceFromMain |
Distance from Main Sequence. |
getEfferentCoupling |
Efferent Coupling (outgoing dependencies) |
getEfferentCoupling |
Efferent Coupling (outgoing dependencies) to the specified package. |
getInstability |
Instability metric. |
getNumberOfCallables |
Gets the total number of callables declared in a type in this package. |
getNumberOfCommentLines |
Gets the number of lines of comments in this package. |
getNumberOfFields |
Gets the total number of fields declared in a type in this package. |
getNumberOfLinesOfCode |
Gets the number of lines of code in this package. |
getNumberOfPublicCallables |
Gets the number of public callables declared in a type in this package. This is an indication of the size of the API provided by this package. |
getNumberOfTypes |
Gets the total number of reference types in this package. |
getPercentageOfComments |
Gets the percentage of lines in this package that consist of comments. |
getTotalNumberOfLines |
Gets the total number of lines in this package, including code, comments and whitespace-only lines. |
isRepresentative |
Cyclic package dependencies: whether this package is considered to be a representative member of the cycle to which it belongs. |
relationalCohesion |
Relational Cohesion. |
srcDep |
Cyclic package dependencies: a source package dependency of this package. |
Inherited predicates
compilerGeneratedReason |
Gets the reason this element was generated by the compiler, if any. |
from Element |
contains |
Holds if this element transitively contains the specified element |
from Element |
fromSource |
Holds if at least one reference type in this package originates from source code. |
from Package |
getADeclaredAnnotation |
Gets an annotation that is declared on this element, excluding inherited annotations. The retention policy of the annotation type is not considered. |
from Annotatable |
getADependencySrc |
Gets a dependency of this element that is from source. |
from MetricElement |
getALevel |
An element has no level defined if it is cyclically dependent on itself. Otherwise, it has: |
from MetricElement |
getAPrimaryQlClass |
Gets the name of a primary CodeQL class to which this element belongs. |
from Package |
getATopLevelType |
Gets a top level type in this package. |
from Package |
getAnAnnotation |
Gets an annotation that applies to this element, including inherited annotations. The results only include direct annotations; indirect annotations, that is repeated annotations in an (implicit) container annotation, are not included. The retention policy of the annotation type is not considered. |
from Annotatable |
getAnAssociatedAnnotation |
Gets an annotation associated with this element, that is: - An annotation directly present on this element, or - An annotation indirectly present on this element (in the form of a repeated annotation), or - If an annotation of a type is neither directly nor indirectly present the result is an associated inherited annotation (recursively) |
from Annotatable |
getCompilationUnit |
Gets the compilation unit that this element belongs to. |
from Element |
getCyclomaticComplexity |
Gets the cyclomatic complexity of this element. This default implementation must be overridden in subclasses. |
from MetricElement |
getDoc |
Cast this element to a |
from Element |
getFile |
Gets the file associated with this element. |
from Top |
getHalsteadLength |
Gets the Halstead length of this element. This default implementation must be overridden in subclasses. |
from MetricElement |
getHalsteadVocabulary |
Gets the Halstead vocabulary of this element. This default implementation must be overridden in subclasses. |
from MetricElement |
getHalsteadVolume |
The Halstead volume is the product of Halstead length and binary logarithm of Halstead vocabulary. |
from MetricElement |
getLevel |
John Lakos’ level metric. |
from MetricElement |
getLocation |
Gets the source location for this element. |
from Top |
getMaintainabilityIndex |
The maintainability index is a composite number expressing the ease of maintainability of a program or one of its components. |
from MetricElement |
getMaintainabilityIndexCommentWeight |
Gets the maintainability index comment weight. |
from MetricElement |
getMaintainabilityIndexWithoutComments |
Gets the maintainability index without comment weight. |
from MetricElement |
getMetrics |
Cast this package to a class that provides access to metrics information. |
from Package |
getName |
Gets the name of this element. |
from Element |
getPrimaryQlClasses |
Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. |
from Top |
getURL |
A dummy URL for packages. |
from Package |
hasAnnotation |
Holds if this element has an annotation, including inherited annotations. The retention policy of the annotation type is not considered. |
from Annotatable |
hasAnnotation |
Holds if this element has the specified annotation, including inherited annotations. The retention policy of the annotation type is not considered. |
from Annotatable |
hasChildElement |
Holds if this element is the immediate parent of the specified element |
from Element |
hasDeclaredAnnotation |
Holds if this element has a declared annotation, excluding inherited annotations. The retention policy of the annotation type is not considered. |
from Annotatable |
hasLocationInfo |
Holds if this element is at the specified location. The location spans column |
from Top |
hasName |
Holds if this element has the specified |
from Element |
isCompilerGenerated |
Holds if this is an auxiliary program element generated by the compiler. |
from Element |
suppressesWarningsAbout |
Holds if this or any enclosing |
from Annotatable |
toString |
Gets a textual representation of this element. |
from Top |