Hi, On 14 August 2012 00:08, Jean-Jacques Peyronel <jjpeyro...@towa-france.fr> wrote: > Are there a way to use dynamic construction with declare @field > > I'm afraid not. This could be feasible for fixed elements at a > joinpoint that are known at compile/weave time (so those encapsulated > in thisJoinPointStaticPart), but not for the more dynamic features in > thisJoinPoint which aren't known until runtime. Feel free to raise an > enhancement request for this. > > Have you an exemple that would be feasible ?
Just to be clear, I wasn't saying you could do anything right now, I was just saying it could be implemented for the static parts of a joinpoint object (like the method signature, line number, declaring type, etc - those elements that are fixed at a joinpoint). You couldn't use it with args/this/target because those are likely to change dynamically at runtime. In your case this would mean these kinds of things would work: @Column(name=thisJoinPointStaticPart+"_uuid", nullable=false, columnDefinition="uuid NOT NULL") @Column(name=thisJoinPointStaticPart.getSignature()+"_uuid", nullable=false, columnDefinition="uuid NOT NULL") @Column(name=thisJoinPointStaticPart.getDeclaringType()+"_uuid", nullable=false, columnDefinition="uuid NOT NULL") cheers, Andy > On 13 August 2012 02:53, Jean-Jacques Peyronel > <jjpeyro...@towa-france.fr> wrote: > > Hi all, > > I have this : > > @Column(name="account_category_uuid", nullable=false) > @Id > private java.util.UUID account_category_uuid; > > I want an aspect who change : > @Column(name="account_category_uuid", nullable=false) > to > @Column(name="account_category_uuid", nullable=false, > columnDefinition="uuid NOT NULL") > > I've a lot of class with this sort of declaration. > > I've tried : > declare @field : * *uuid : @Column(columnDefinition="uuid NOT NULL"); > but this seems not change the first declaration. > > Are there a way to use dynamic construction with declare @field like : > @Column(name=thisjointpoint+"_uuid", nullable=false, > columnDefinition="uuid NOT NULL") > > Thanks in advance. > > Jean-Jacques. > > _______________________________________________ > 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 > > > _______________________________________________ > 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