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

全部评论

相关推荐

06-19 19:06
门头沟学院 Java
码农索隆:别去东软,真学不到东西,真事
点赞 评论 收藏
分享
下个早班:秒挂就是不缺人
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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