What is the way to specify Class Instance based JAXB Listener (as in Entity Bean) like : afterUnmarshall , beforeMarshall but on every class instance based (by implementing any interface or by annotation).
@XmlRootElement(name = "Person") // Edited
public class Person {
protected String name; //setter getter also implemented
void beforeMarshall(){
//..........
}
void afterUnmarshall (){ // by implementing any interface or by annotation
//..........
}
}
JAXB will match the following method signatures for those events: