package mypackage
{
public class SingletonExample
{
public function SingletonExample(enforcer:SingletonEnforcer)
{
}
private static var _instance : SingletonExample;
public static function getInstance():SingletonExample
{
if (_instance == null)
_instance = new SingletonExample(new SingletonEnforcer());
return _instance;
}
}
}
class SingletonEnforcer {}