Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Type Patterns in declare statements

Lots of questions today ;-)

Was just wondering if it is possible to use some kind of type pattern within
declare parents statements?

For example given the following class that I want to serialise

class Foo {
private Bar a;
private Far b;

...
}

Can I write the following in a single statement by somehow just referring to
Foo i.e. Foo and all members in Foo..?

declare parents: Foo implements Serializable;
declare parents: Bar implements Serializable;
declare parents: Far implements Serializable; 

I know I can also write 

declare parents: (Foo || Bar || Far) implements Serializable;

but was just wondering if there were some additional
operators/designators/tricks/idioms I could utilise for expressing "Foo and
all members within Foo" without resorting to the above.

Thanks

Neil Loughran







Back to the top