Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] inter-type declaration of a field variable is not serialized

I've noticed the following:

   public long ISimpleC.id=-1;
// declares the id on ISimpleC interface. Id is not serialized correctly for all classes that implement ISimpleC. Eclipse debugger shows the field like been nested within inner classes. Reflection tools can't read the value of id

   public long SimpleC.id=-1;
// declares the id on SimpleC class Id is serialized correctly. Eclipse debugger shows the id as a field of the class and reflection tools read the value of the id

So, if you introduce the id straight away on the class as a public member, it works. My problem is that I was to introduce it to a set of classes, all of them implementing an interface (or even if I could introduce it to a set of classes belonging to a package).

Regards,

Kostas



Konstantinos Kougios wrote:
Hi,

I've a serialization problem and I tried to search on google or this emailing list, but I couldn't find a solution. So, here it is:

I am introducing i.e. a boolean variable in some classes using an aspect:

...
   private boolean IUpdatable.isDirty=false;
...

IUpdatable is an interface and it "extend Serializable".

I now got this class:

public class Path implements IUpdatable
{
  private String name;
  ...
}


While name is serialized correctly, the isDirty is not serialized. I tried various alternatives, like making the aspect serializable or pethis() but it didn't solve my problem. I know that the isDirty in fact is stored inside the aspect and not in the Path class, but how can I make it serialize correctly?

Thanks,

Kostas
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users





Back to the top