class Message implements Serializable {

    @Override
    public String toString() {
        StringBuilder buffer = new StringBuilder();

        buffer.append(severity.toString())
                .append(' ')
                .append(code)
                .append('[');

        int max = invalidProperties.size();
        for (int i = 0; i < max; i++) {
            if (i > 0) {
                buffer.append(", ");
            }
            buffer.append(invalidProperties.get(i).getObject().toString())
                    .append('.')
                    .append(invalidProperties.get(i).getProperty());
        }

        buffer.append(']')
                .append('\n')
                .append(text);

        return buffer.toString();
    }

    public  Message(@CheckForNull String code, String text, Severity severity);
      Message(@CheckForNull String code, String text, Severity severity,
            @CheckForNull List<ObjectProperty> invalidObjectProperties, @CheckForNull Set<ValidationMarker> markers);

}