AspectJ中target,this和within的区别

首先,AspectJ官方怎么描述这三个关键字:

this(SomeType):when the object currently executing (i.e. this) is of type SomeType

当前执行对象是否是某种类型

target(SomeType):when the target object is of type SomeType

目标对象是否是某种类型

within(MyClass):when the executing code belongs to class MyClass

当前执行代码是否属于某个类

within只支持类,而target和this支持类和接口,target会获取继承关系,而this不会,只会获取目标对象

全部评论

相关推荐

2024-12-29 15:37
已编辑
西华大学 图像识别
程序员牛肉:去不了,大厂算法卡学历吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务