Not an issue. eclipse was fooling me. The class in question is a file with a .java extension, which is opened in eclipse's Java editor by default. If I change to .aj or open the file using the AspectJ editor, all is fine. I noticed this while beginning to write a test project.
Sorry for the noise! On Wed, Apr 10, 2013 at 10:26 AM, Andy Clement <andrew.clem...@gmail.com>wrote: > I'm not aware of any bugs with inner aspects, how does it not work for you? > > Andy > > > On 9 April 2013 08:52, Matthew Adams <matt...@matthewadams.me> wrote: > >> I'd like to be able to create a POJO entity and declare an inner aspect. >> For >> example: >> >> @Entity // introduced via ITD >> public class User { >> >> @Id // introduced via ITD >> Long id; // introduced via ITD >> >> String username; // introduced via ITD >> >> public static aspect Mapping { >> declare @field: User.id: @GeneratedValue(GenerationType.SEQUENCE, >> generator="USER_SEQ"); >> declare @field: User.username: @Column(unique = true); >> } >> } >> >> For those of you who'll inevitably ask "why would you do such a crazy >> thing?": in the example above, class User is receiving the field "String >> username" via an introduction, and I want to add a JPA unique column >> constraint on the mapping. This works fine if I declare aspect "Mapping" >> in >> its own file, but I'd like to keep each class's mapping with the class >> itself. >> >> For those of you who'll inevitably point me to ORM XML metadata: I'm >> fully >> aware that I can do that; I just need to use the annotations for default >> mappings, overridden by XML if the user wants to override them. >> >> -matthew >> >> >> >> -- >> View this message in context: >> http://aspectj.2085585.n4.nabble.com/Class-with-inner-aspect-tp4650850.html >> Sent from the AspectJ - users mailing list archive at Nabble.com. >> _______________________________________________ >> aspectj-users mailing list >> aspectj-users@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> > > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > -- mailto:matt...@matthewadams.me <matt...@matthewadams.me> skype:matthewadams12 googletalk:matt...@matthewadams.me http://matthewadams.me http://www.linkedin.com/in/matthewadams
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users