1 9 package org.nanocontainer.testmodel; 10 11 import org.picocontainer.Disposable; 12 import org.picocontainer.Startable; 13 14 17 public abstract class X implements Startable, Disposable { 18 19 public static String componentRecorder = ""; 20 21 public static void reset() { 22 componentRecorder = ""; 23 } 24 25 public void start() { 26 componentRecorder += "<" + code(); 27 } 28 29 public void stop() { 30 componentRecorder += code() + ">"; 31 } 32 33 public void dispose() { 34 componentRecorder += "!" + code(); 35 } 36 37 private String code() { 38 String name = getClass().getName(); 39 return name.substring(name.lastIndexOf('.') + 1, name.length()); 40 } 41 42 } 43 | Popular Tags |