Last active
August 29, 2015 14:12
-
-
Save siratama/ad36b530f92fbff4c5f0 to your computer and use it in GitHub Desktop.
IntelliJ IDEA LiveTemplates for Haxe Singleton
This file contains hidden or 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
private static var instance:$Class$; | |
public static inline function getInstance():$Class$ | |
return instance == null ? instance = new $Class$(): instance; | |
private function new() | |
{ | |
$END$ | |
} |
This file contains hidden or 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
private static var instance:$Class$; | |
@:allow($END$) private static inline function getInstance():$Class$ | |
return instance == null ? instance = new $Class$(): instance; | |
private function new() | |
{ | |
} |
This file contains hidden or 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
@:allow($END$) private static var instance(get, null):$Class$; | |
private static inline function get_instance():$Class$ | |
return instance == null ? instance = new $Class$(): instance; | |
private function new() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment