Last active
November 29, 2016 10:12
-
-
Save hisetu/256460b23e27dd8da6265155d31343aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
#parse("File Header.java") | |
public class ${NAME}{ | |
private static volatile ${NAME} INSTANCE; | |
public static ${NAME} getInstance() { | |
if (INSTANCE == null) { | |
synchronized (${NAME}.class) { | |
if (INSTANCE == null) { | |
INSTANCE = new ${NAME}(); | |
} | |
} | |
} | |
return INSTANCE; | |
} | |
public static void destroyInstance(){ | |
INSTANCE = null; | |
} | |
private ${NAME}() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment