Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] status of hasmethod and hasfield

Hi,

> Is there any documentation on them?
> is " it doesn't yet take into account ITDs." true?
> Are they still considered to be experimental?

I'm afraid they continue to be experimenta because they don't take
ITDs into account.  If you don't care about ITDs, you can use them and
they'll work fine.

This old issue contains a lot of the discussion:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=86818

The mailing list (archive) contains many examples of how to use them,
but they basically function as you would expect:

-----8<------
public class A {
  public static void main(String[]argv) {
  }
}

aspect X {
  declare parents: hasmethod(public void main(..)) implements
java.io.Serializable;
}
-----8<------
$ ajc -1.5 -showWeaveInfo -XhasMember A.java
Extending interface set for type 'A' (A.java) to include
'java.io.Serializable' (A.java)

cheers,
Andy

On 11 February 2012 12:35, Dénes Németh <mr.nemeth.denes@xxxxxxxxx> wrote:
> Hi
>
> Does anyone know what is the status of the "experimental" features hasmethod
> and hasfield?
>
> On the maven aspectj site I found "Enables the compiler to support
> hasmethod(method_pattern) and hasfield(field_pattern) type patterns, but
> only within declare statements. It's experimental and undocumented because
> it may change, and because it doesn't yet take into account ITDs."
>
> Is there any documentation on them?
> is " it doesn't yet take into account ITDs." true?
> Are they still considered to be experimental?
>
> Best wishes,
> Denes
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top