1 package com.stateofflow.eclipse.metrics.calculators.statements;
2
3 final class Statements {
4 private int statements;
5 private int classStatements;
6
7 public Statements() {
8 }
9
10 public Statements(final Statements toCopy) {
11 statements = toCopy.statements;
12 classStatements = toCopy.classStatements;
13 }
14
15 public int getStatementCount() {
16 return statements;
17 }
18
19 public void handleInnerClass(final Statements inner) {
20 increase(inner.classStatements);
21 }
22
23 public void increase(final int delta) {
24 statements += delta;
25 classStatements += delta;
26 }
27
28 public void increment() {
29 increase(1);
30 }
31
32 public void startMethod() {
33 statements = 0;
34 }
35
36 public void startType() {
37 classStatements = 0;
38 }
39 }
40