什么..和* AspectJ中的意思 [英] What do .. and * mean in aspectj

查看:210
本文介绍了什么..和* AspectJ中的意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的理解是, .. 0许多指定参数和 * 任何的名字之一ARG。它是否正确?

确实喜欢 ARGS(..,myArg,..)AspectJ的支持语法


解决方案

这是从AspectJ的网站的 http://www.eclipse.org/aspectj/doc/next/progguide/semantics-pointcuts.html

* 重新presents任意数量的,除了字符。

.. 重新presents任何数量的字符,包括任意数量的。

更新
从AspectJ的在行动 - 为方法签名:


  

在方法签名,通配符..被用于表示任何类型和通过参数的方法号

* 指定一个参数

My understanding is that .. is 0-Many args and * is one arg of any name. Is this correct?

Does aspectj support syntax like args(..,myArg,..)?

解决方案

This is from AspectJ site: http://www.eclipse.org/aspectj/doc/next/progguide/semantics-pointcuts.html

* represents any number of characters except "."

.. represents any number of characters including any number of "."

Update From AspectJ in Action - for method signatures:

In method signatures, the wildcard .. is used to denote any type and number of arguments taken by a method

* specifies a single argument

这篇关于什么..和* AspectJ中的意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆