以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 面向方面的程序设计(AOP) 』   (http://bbs.xml.org.cn/list.asp?boardid=45)
----  【切点】AOP切点的可变参数问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=45&rootid=&id=85024)


--  作者:youngshaver
--  发布时间:5/31/2010 4:32:00 PM

--  【切点】AOP切点的可变参数问题
我想让AOP的的切点的参数是可变的,我写成了下面的形式,可是出现了错误

pointcut ethod(Object... objects): call(* *.*(..)) && args(objects...);

before(Object... objects) : ethod(objects...){  

  StringBuffer longMethod = new StringBuffer(thisJoinPoint.toLongString());
  System.out.println(thisJoinPoint.toLongString());
}

红色部分是错误,错误的提示是"The variable argument type Object of the method ajc$before$aompi_hardcore_ParAspect$1$8a31fb49 must be the last parameter"

哪位大侠能给解决一下?  

万分感谢!!


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
41.016ms