Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is @DeclareParents the only way to make inter-type field declaration in @AspectJ notation

Due to the constraint that code must be compilable with 'javac', @DeclareMixin/@DeclareParents in the only way.

-Ramnivas

2009/8/31 João Gonçalves <jocolimonada@xxxxxxxxx>
Greetings, I have a small doubt.
In AspectJ's "traditional" notation, it is possible to declare a new field for a type this way:
public aspect A {
    private FieldType  TargetType.field = <something>;
}
In @AspectJ notation do I have to create an interface (mixin) that has that field and use @DeclareParents/@DeclareMixin to make all instances of the type TargetType have that field.
Is there a simpler way?
Thanks

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top