01 /**
02 * Singleton class
03 */
04 public class ${classname} {
05
06 private static ${classname} _instance;
07
08 private ${classname}(){
09 //TODO: put your code here
10 }
11
12 /**
13 * returns Singleton Instance
14 * @return ${classname}
15 */
16 public static synchronized ${classname} getInstance(){
17 if( _instance == null ) _instance = new ${classname}();
18 return _instance;
19 }
20
21 //TODO: implement class ${classname}
22
23 }
|