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不会,只会获取目标对象

全部评论

相关推荐

龙珠传说:nb,公务员解约不需要支付违约金吧
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务