Number of Fields of a Type

Count the number of fields declared by a type.

Pre-packaged Query

Name of query="Semmle/Metrics/Types/Size/Reftypes with many fields"

Reports types that declare more than 15 fields, in a bar chart, in decreasing order of the number of fields.

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

.QL Source of Metric

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

int getNumberOfFields() {
  result = count(this.getAField())
}

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

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