首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 3控制微型框架反演

3控制微型框架反演

  • 资源大小:5.01 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: 控制 框架 微型 反演

资 源 简 介

Very thin and fast mini-framework with basic IoC functionality. Example of usage Define your container factory class ``` package { public final class Config { [Singleton] [onCreate(name="init")] [onDestroy(name="destroy")] public function someClass():SomeClass { return new SomeClass("test"); } [onCreate(name="init")] public function otherClass():SomeOtherClass { return new SomeOtherClass(); } } } ``` As you may guess, definitions like init function, singleton or destroy function for cached instances are placed in the configuration class as meta-tags. Now, we define our test classes "SomeClass" and "SomeOtherClass" SomeClass ``` package { public class SomeClass { private var m_arg:String; private static var cnt:uint = 0; public function SomeClass(Arg:String) { m_arg = Arg; cnt++; } public func

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP