mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
15 lines
406 B
Plaintext
15 lines
406 B
Plaintext
/**
|
|
* Provides classes and predicates for computing metrics on Java fields.
|
|
*/
|
|
|
|
import semmle.code.java.Member
|
|
|
|
/** This class provides access to metrics information for fields. */
|
|
class MetricField extends Field {
|
|
/**
|
|
* The afferent coupling of a field is defined as
|
|
* the number of callables that access it.
|
|
*/
|
|
int getAfferentCoupling() { result = count(Callable m | m.accesses(this)) }
|
|
}
|