Java Objective-C AOP


Java

Use an AOP library or byte-code engineering (BCEL, cglib, asm, etc) to create a sub-class on the fly. Any calls to the getter or setter of an observed property notifies any attached observers.

Objective-C

This is similar to Java - uses isa swizzling to create a sub-class on the fly. Any calls to an observed property notifies attached observers. Interestingly, in Objective-C we can swizzle back to the original class without the wrapped property methods, if all observers are removed. Whereas in Java a class is typically loaded once, so you're always notifying a (possibly empty) set of observers.

优质内容筛选与推荐>>
1、suoi14 子树查找 (dfs)
2、Swift语法基础入门三(函数, 闭包)
3、关于如何远程调试tomcat
4、每日一帖,记录技术点滴
5、运行 python 脚本错误:urllib2.URLErroe:<urlopen error unknown url type : https>


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号