if (event instanceof IWriteEvent) {
IWriteEvent write = (IWriteEvent)event;
Object value = write.getValue();
if (event instanceof LocalVariableWriteEvent) {
LocalVariableWriteEvent local = (LocalVariableWriteEvent)event;
return new LocalVariableImpl(session, local.getVariable(), value, local.getTimestamp());
} else if (event instanceof FieldWriteEvent) {
FieldWriteEvent field = (FieldWriteEvent)event;
return new FieldVariableImpl(session, field.getField(), value, field.getTimestamp());
}
}