Package io.spine.validation.java
Class JavaValidationRenderer
- java.lang.Object
-
- io.spine.protodata.renderer.Renderer
-
- io.spine.protodata.codegen.java.JavaRenderer
-
- io.spine.validation.java.JavaValidationRenderer
-
- All Implemented Interfaces:
io.spine.protodata.config.Configured
,io.spine.protodata.config.ConfiguredQuerying
,io.spine.protodata.Querying
public final class JavaValidationRenderer extends io.spine.protodata.codegen.java.JavaRenderer
ARenderer
for the validation code in Java.Inserts code into the
Validate
insertion point.The generated code assumes there is a variable called
result
. Its type is the type of the validated message. The variable holds the value of the message to validate.The generated code is a number of code lines. It does not contain declarations (classes, methods, etc.).
If the validation rules are broken, throws a
ValidationException
.
-
-
Constructor Summary
Constructors Constructor Description JavaValidationRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
render(io.spine.protodata.renderer.SourceFileSet sources)
-