Package dev.relism.flash.ext.validation
Class Validator
java.lang.Object
dev.relism.flash.ext.validation.Validator
The compiled constraints of one type. Built once per class and reused for every request.
verify(java.lang.Object) allocates nothing when a value passes: the loop walks an array (no iterator),
reads fields through exact-signature MethodHandles (no boxing, no argument array), and
compares against operands resolved at compile time. The violation list and the exception are
constructed only once something actually fails.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()True when the type declares no constraints at all —verify(java.lang.Object)is then a no-op.voidVerifies every constraint ontarget.
-
Method Details
-
isEmpty
public boolean isEmpty()True when the type declares no constraints at all —verify(java.lang.Object)is then a no-op. -
verify
Verifies every constraint ontarget.- Throws:
ValidationException- with all failures, never just the first
-