Okay, so the problem I've got is that my worker is run before the other
workers that add the persistent property. so when the enhancement is
run, i get javassist compile errors because the functions i need don't
exist yet (even though they will later). anyone have any suggestions on
how I can add a persistent property in my annotation worker? is there
some way of having my enhancement actually compiled after or at the same
time as the other enhancement?
one possible solution i thought might work would be to register 2
annotation workers for the same annotation and split up the work but i
don't think that will work.
On Wed, 2006-08-16 at 17:00 -0400, Dan Adams wrote:
> I have an annotation i'm working on (this isn't my first one and i'm
> almost done with this one) where I need to add a persistent property and
> use it in my enhanced code. What's the best way of doing this? I've been
> digging around the T4 sources but haven't been able to find an answer to
> this. So far I have:
>
> String idField = propertyName + "Id";
> IPropertySpecification pspec = new PropertySpecification();
> pspec.setName(idField);
> pspec.setPersistence("session");
> pspec.setLocation(location);
> pspec.setInitialValue(null);
> spec.addPropertySpecification(pspec);
>
> then i get the getter method name with:
> String idGetter = op.getAccessorMethodName(idField);
>
> but at runtime i get the javassist exception "[source error] Method
> setWidgetId not found in ..." Any ideas?
>
--
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]