Aspectj拦截Scala中的内部类

时间:2016-05-05 15:55:38

标签: scala aspectj inner-classes

如何使用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类连接点

0 个答案:

没有答案