This document outlines the definition of file metrics for Java.
The "complexity" metric counts:
ifandelse ifstatements- ternary operators
forloops with following syntaxes:for (<initialization>; <termination>; <increment>) {...}for (<element> : <iterable>) {...}
whileanddo...whileloopscaselabels in switch-statementscatchblocks- logical binary operations
&&and|| - everything counted for the "functions" metric
It does not count:
.forEach(...)method call for iterables and other of built-in function calls
The "functions" metric counts:
- method declarations and definitions in classes, abstract classes and interfaces
- static methods and constructors
- lambda expressions
- initialization block (static and non-static)
The "classes" metric counts:
- definitions of
class,abstract class,interface,enumandrecord - anonymous classes
see README.md