Java JAXB类实例侦听器
指定基于类实例的JAXB侦听器(如在实体Bean中)的方法是什么,例如:afterUnmarshall、beforeMarshall但基于每个类实例(通过实现任何接口或注释)Java JAXB类实例侦听器,java,xml-parsing,jaxb,jaxb2,Java,Xml Parsing,Jaxb,Jaxb2,指定基于类实例的JAXB侦听器(如在实体Bean中)的方法是什么,例如:afterUnmarshall、beforeMarshall但基于每个类实例(通过实现任何接口或注释) JAXB将为这些事件匹配以下方法签名: // This method is called immediately after the object is created and before the unmarshalling of this // object begins. The callback pr
JAXB将为这些事件匹配以下方法签名:
// This method is called immediately after the object is created and before the unmarshalling of this
// object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling.
void beforeUnmarshal(Unmarshaller, Object parent);
//This method is called after all the properties (except IDREF) are unmarshalled for this object,
//but before this object is set to the parent object.
void afterUnmarshal(Unmarshaller, Object parent);
// This method is called immediately after the object is created and before the unmarshalling of this
// object begins. The callback provides an opportunity to initialize JavaBean properties prior to unmarshalling.
void beforeUnmarshal(Unmarshaller, Object parent);
//This method is called after all the properties (except IDREF) are unmarshalled for this object,
//but before this object is set to the parent object.
void afterUnmarshal(Unmarshaller, Object parent);