[
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, Alexandru Popescu wrote:
Thanks for quick answer, but..
> According to www.eclipse.org/aspectj/doc/next/adk15notebook/annotations-itds.html an annotation type
> cannot be the target of an inter-type declaration. What you need is to push your ITD on an type
> annotated with @Persistable.
I've seen this doc, and wondering why that's the case. Basically
it is possible having some inter-types using marker interfaces.
> So you probably need a marker interface and than do the ITD:
> interface PersistenceAware {};
> declare parents @Persistable * implements java.io.Serializable;
> declare parents @Persistable * implements PersistenceAware;
>
> static final PersistenceAware.serialVersionUID = 17L;
1) Both "static" and "final" fields doesn't work with _interface_
(compiler error)
2) The problem with above (when applying inter-type field to an
_interface_) is that as a result I have other field than
'serialVersionUID':
@Persistable Pojo.class:
public class Pojo implements java.io.Serializable, PersistenceAware
{
//...
public long ajc$interField$MyAspect$PersistenceAware$serialVersionUID;
//..and I need simple public final _static_ serialVersionUID...
}
3) When applying to a concrete _class_ with:
@Persistable Pojo.class:
public class Pojo implements java.io.Serializable
{
//...
static final PojoConcrete.serialVersionUID = 17L;
//it works, but I don't want the pointcut based on a concrete
//class
}
Tomasz
--
_i______'simplicity_is_the_key'__________tomasz_nazar
_ii____'i_am_concern_oriented'________________PJKM.pl
_iii__'patsystem.sf.net'___________________linux_user
_Heaven_&_Fellows,_PPP______________________prevayler