Skip to main content

[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?

NB:  resend without using Nabble's "raw" tag.

NB:  contrived example; pay attention to form, not substance here, please.

Consider this annotation: 

public @interface Gimme {
  Class<?>[] value;
}

Consider this annotated class: 

@Gimme({ Cloneable.class, Serializable.class})
public class Thingy {
  // ...
}

How do I craft a type expression that means "any class where the value
property of its @Gimme annotation contains Serializable.class"?  I tried 

declare parents: (@Gimme(value = {..,Serializable.class,..}) *) implements
Serializable; // (no worky 
work)

but that didn't work; parser complained about token "{".  I can't think of
another way to write this (maybe it's Fridayitis). 

Any suggestions? 

TIA, 
Matthew



--
View this message in context: http://aspectj.2085585.n4.nabble.com/Matching-on-one-of-an-annotation-s-values-in-a-multivalued-property-tp4650839p4650842.html
Sent from the AspectJ - users mailing list archive at Nabble.com.


Back to the top