|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ComponentClassForLoading.java | - | 0% | 0% | 0% |
|
1 |
package test.dynamic;
|
|
2 |
|
|
3 |
/** Simple class with some static initialization that can be observed without
|
|
4 |
* actually operating on any of the class's interface.
|
|
5 |
*/
|
|
6 |
public class ComponentClassForLoading extends java.awt.Component { |
|
7 |
private static int instanceCount = 0; |
|
8 |
|
|
9 | 0 |
public ComponentClassForLoading() {
|
10 | 0 |
synchronized(getClass()) {
|
11 | 0 |
++instanceCount; |
12 |
} |
|
13 |
} |
|
14 |
|
|
15 | 0 |
public String toString() {
|
16 | 0 |
synchronized(getClass()) {
|
17 | 0 |
return String.valueOf(instanceCount);
|
18 |
} |
|
19 |
} |
|
20 |
} |
|
21 |
|
|