io.avaje.validation.core.DMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avaje-validator Show documentation
Show all versions of avaje-validator Show documentation
validator for annotated pojos using constraint annotations and source code generation
package io.avaje.validation.core;
import io.avaje.validation.adapter.ValidationContext;
import java.util.Map;
record DMessage(String template, Map attributes, int dedupNumber)
implements ValidationContext.Message {
// templates can be the same across multiple adapters
// these numbers ensure no cache collision
private static int messageCounter = 0;
DMessage(String template, Map attributes) {
this(template, attributes, messageCounter++);
}
@Override
public String lookupkey() {
return template + dedupNumber;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy