|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ClassForReloading.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 ClassForReloading { |
|
| 7 |
private static int instanceCount = 0; |
|
| 8 |
|
|
| 9 | 0 |
public ClassForReloading() {
|
| 10 | 0 |
synchronized(getClass()) {
|
| 11 | 0 |
++instanceCount; |
| 12 |
} |
|
| 13 |
} |
|
| 14 |
|
|
| 15 | 0 |
public String toString() {
|
| 16 | 0 |
return String.valueOf(instanceCount);
|
| 17 |
} |
|
| 18 |
|
|
| 19 | 0 |
public static void main(String[] args) { |
| 20 | 0 |
System.out.println("Main routine of dynamically loaded class");
|
| 21 |
} |
|
| 22 |
} |
|
| 23 |
|
|
||||||||||