首页 > 编程语言 > 详细

Java Objective-C AOP

时间:2019-09-23 16:28:00      阅读:115      评论:0      收藏:0      [点我收藏+]

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.

Java Objective-C AOP

原文:https://www.cnblogs.com/feng9exe/p/11571951.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!