Given this scenario where you have "transfer objects" (POJO's with just getters/setters) which are passed by a client library to your API, what is the best way to name the transfer objects?
package com.x.core;
public class Car {
private String make;
private String model;
public Car(com.x.clientapi.Car car) {
this.make = car.getMake();
this.model = car.getModel();
}
}
In this example your main class and your transfer object both have the name Car
. They are in different packages but I think it's confusing to have the same name. Is there a best practice on how to name the transfer objects?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…