I want to fetch the variable(extra field) added to a serialized class at runtime. For example
Class A
{
String name;
}
int travId=123;
"travId" is a extra field added to Class A using javassist,before the object of class A is serialized. While de-serializing , how can i fetch it? I tried to fetch from readObject () and others(like parsing the deserialized object to Json format) , but my attempt was not successful.
And directly implement through the Object throws an no such field found compilation error.
Is there any way i can fetch the travId field using javassist at runtime.