class OperationSource implements Externalizable {

    private static final long serialVersionUID = 1L;

    /**
     * ID,type对应操作的唯一标识
     */
    private String id;

    /**
     * 操作源名称
     */
    private String name;

    /**
     * 操作目标,通常为ID对应的详情数据
     */
    private Object data;

    public static OperationSource of(String id, Object data) {
        return of(id, id, data);
    }

    public static Context ofContext(String id, String name, Object data) {
        return Context.of(OperationSource.class, of(id, name, data));
    }

    public static Optional<OperationSource> fromContext(ContextView ctx) {
        return ctx.getOrEmpty(OperationSource.class);
    }

    @Override
    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeUTF(id);
        SerializeUtils.writeObject(name, out);
        SerializeUtils.writeObject(data, out);
    }

    @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {<FILL_FUNCTION_BODY>}
}

        id = in.readUTF();
        name = (String) SerializeUtils.readObject(in);
        data = SerializeUtils.readObject(in);
    
<no_super_class>