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...
}