SingletonUtil
| Kind of class: | public class |
|---|---|
| Package: | org.casalib.util |
| Inherits from: | none |
| Version: | 01/19/09 |
| Author: | Aaron Clinger |
| Classpath: | org.casalib.util.SingletonUtil |
| File last modified: | Sunday, 28 March 2010, 11:55:55 |
Provides utility functions for creating and managing singletons.
Summary
Class methods
- singleton (type:Class) : *
- Creates a singleton out of a class without adapting or extending the class itself.
Class methods
singleton
public static function singleton (
type:Class) : *
Creates a singleton out of a class without adapting or extending the class itself.
Parameters:
type:
The class you want a to created a singleton from.
Returns:
- The singleton instance of the class.
Example:
-
var stopwatch:Stopwatch = SingletonUtil.singleton(Stopwatch); stopwatch.start();