[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Matching on one of an annotation's values in a multivalued property?
|
I could not agree more. Sugared variant is wrong and misleading, violates the rule of least surprise since it overloads "=" with something other than either "assign" or "equals" (namely "contains/includes").
_________________________ Sent over RFC-1149 compliant transport - please excuse occasionnal packet loss My spontaneous impulse upon reading the sugared variant was to dislike it more than the other one which at least bears schematic similarity to known method parameter matching patterns.
Alexander Kriegisch
As we kind of chatted about earlier on Skype, I don't think you can do this right now. The support for annotation array values isn't all in place and even then the support for class literal annotation values isn't all there either. There is so much to annotations that the various use cases are addressed as they come up. You seem to have come up with this one so it is time to look at filling it in.
The syntax for matching one element of an array value is probably something like you propose:
declare parents: (@Gimme(value = {..,Serializable.class,..}) *) implements Serializable;
even though I don't really like the look of it.
But perhaps a syntax sugared variant of:
declare parents: (@Gimme(value = Serializable.class) *) implements Serializable;
would be OK for a single value being located, even though strictly speaking '=' is wrong and it should be something that suggests 'contains/includes'. (I'm open to suggestions).
cheers,
Andy
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature