It is nice to see a class implementing Interfaces. It is nicer to understand what it does
TL;DR: Name your classes after real-world concepts.
Problems
Solutions
- Find the correct name using the MAPPER
Context
Some languages bring idioms and common usages against good model naming.
We should pick our names carefully.
Sample Code
Wrong
public interface Address extends ChangeAware, Serializable {
/**
* Gets the street name.
*
* @return the street name
*/
String getStreet();
//...
}
//Wrong Name - There is no concept 'AddressImpl' in real world
public class AddressImpl implements Address {
private String street;
private String houseNumber;
private City city;
//..
}
Right
//Simple
public class Address {
private String street;
private String houseNumber;
private City city;
//..
}
//OR
//Both are real-world names
public class Address implements ContactLocation {
private String street;
private String houseNumber;
private City city;
//..
}
Detection
[X] Automatic
