Class MetricPackage::MetricPackage

This class provides access to metrics information for packages.

Direct supertypes

Indirect 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

contains

Holds if this element transitively contains the specified element e.

from Element
fromSource

Holds if at least one reference type in this package originates from source code.

from Package
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
getATopLevelType

Gets a top level type in this package.

from Package
getAnAnnotation

Gets an annotation that applies to this element.

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 Documentable.

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
getURL

A dummy URL for packages.

from Package
hasAnnotation

Holds if this element has an annotation.

from Annotatable
hasAnnotation

Holds if this element has the specified annotation.

from Annotatable
hasChildElement

Holds if this element is the immediate parent of the specified element e.

from Element
hasLocationInfo

Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see LGTM locations.

from Top
hasName

Holds if this element has the specified name.

from Element
suppressesWarningsAbout

Holds if this or any enclosing Annotatable has a @SuppressWarnings("<category>") annotation attached to it for the specified category.

from Annotatable
toString

Gets a textual representation of this element.

from Top