highsource / highsource/jaxb-tools
New extension for -XObjectsHash
- Dominant language
- Java
- Stars
- 465
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
Update the SimpleHash plugin to have a 'mode', or create anew ObjectsHash plugin
1. Use Objects.hash for generating simple, dependency-free, hash codes for generated objects.
2. Include unit test for all-primitive types, including arrays of primitives
3. Include unit test for object containing another generated object as a child object.
```
import java.util.Objects;
public class Employee {
private String name;
private int id;
private double salary;
public Employee(String name, int id, double salary) {
this.name = name;
this.id = id;
this.salary = salary;
}
@Override
public int hashCode() {
return Objects.hash(name, id, salary);
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.