listener.beforeUnmarshal(target, parent);
}
}
public void afterUnmarshal(Object target, Object parent) {
if(classBasedUnmarshalEvents != null) {
UnmarshalCallback callback = (UnmarshalCallback)classBasedUnmarshalEvents.get(target.getClass().getName());
if(callback != null && callback.getAfterUnmarshalCallback() != null) {
try {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try{
AccessController.doPrivileged(new PrivilegedMethodInvoker(callback.getAfterUnmarshalCallback(), target, new Object[]{unmarshaller, parent}));
}catch (PrivilegedActionException ex){
if (ex.getCause() instanceof IllegalAccessException){
throw (IllegalAccessException) ex.getCause();
}
if (ex.getCause() instanceof InvocationTargetException){
throw (InvocationTargetException) ex.getCause();
}
throw (RuntimeException)ex.getCause();
}
}else{
PrivilegedAccessHelper.invokeMethod(callback.getAfterUnmarshalCallback(), target, new Object[]{unmarshaller, parent});
}
} catch(Exception ex) {}
}
}
if(listener != null) {