Number of Callables of a Type

The number of callables (methods or constructors) defined in this type.

Pre-packaged Query

Query name="Semmle/Metrics/Types/Size/Reftypes with many callables"

Reports types that contain more than 50 callables, as a bar chart, in descending order.

from MetricRefType t, int n
where t.fromSource() and
      n = t.getNumberOfCallables() and
      n > 50
select t,n order by n desc

See also Average Number of Methods per Type in a Package for further examples of the use of this metric.

.QL Source for Metric

This metric is defined in the class MetricRefType, and its definition reads:

int getNumberOfCallables() {
  result = count(this.getACallable())
}

Digg!Reddit!Del.icio.us!Facebook!Slashdot!Technorati!StumbleUpon!Ma.gnolia!

Comments
Only registered users can write comments!
 
< Prev   Next >