如何使用Aspectj注释拦截Scala中的内部类?
package p
class Ext {
class Inn {
def Inner() {}
}
def Extern() {}
}
object Main{
def main(args: Array[String]) {
val res = new Ext
res.Exter()
val res2 = new res.Inn
res2.Inner()
}
}
package q
@Aspect
class MethodLogger {
@Before("within(p.*)")
def logMethod(joinPoint: JoinPoint) = {
println(joinPoint)
}
}
Aspect Code仅允许查看Main和Ext类的连接点,但我看不到Inn类连接点