Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] InterType: introducing serialVersionUID into@Persistable

On the next beautiful day: Mon, 19 September, 2005, Antti Karanta wrote:

> 
> > The actual aspect's code:
> > public privileged aspect MyAspect 
> > {
> >     declare parents: @Persistable * implements PersistenceAware;
> >     public long PersistenceAware.XXX = 17;
> > }   
> 
>   Have you tried
> 
> public aspect MyAspect {
>   interface PersistenceAware { 
>     long serialVersionUID = 17; // this is static final
>   }
>   declare parents: @Persistable * implements PersistenceAware;
> }   
> 
>      -Antti-


Thanks for an idea.
Just tried. Not working at all. No fields introduced to @Persistable+.

Tomasz

Btw. It doesn't matter if each field declared in an interface is static
or final by default. As I'm not interested in that at all. 
Btw2. For serialVersionUID to work, it has to be explicitly set to
final and static. In other case it doesn't work as supposed to.

Aim: to have 'static final' field in a concrete class which implements
some interface.




-- 
  _i______'simplicity_is_the_key'__________tomasz_nazar
  _ii____'i_am_concern_oriented'________________PJKM.pl
  _iii__'patsystem.sf.net'___________________linux_user
  _Heaven_&_Fellows,_PPP______________________prevayler


Back to the top