赞
踩
/** * @desc java singleton class generate by private static internal class */ public class HookManagerHandler { private HookManagerHandler() { } private static class MangerHandler { private static HookManagerHandler hookManagerHandler = new HookManagerHandler(); } public static HookManagerHandler getInstance() { return MangerHandler.hookManagerHandler; } }
/**
* @desc a variable static final
*/
public final class HookManager {
private static final HookManager HMG = new HookManager();
public static HookManager get() {
return HMG;
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。