Search code examples
javaannotationsaspectj

What do .. and * mean in 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,..)?


Solution

  • 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