JavaValidationRenderer

public final class JavaValidationRenderer extends JavaRenderer

A Renderer 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 io.spine.validate.ValidationException.

Inherited properties

Link copied to clipboard
public BoundedContext protoDataContext

Functions

Link copied to clipboard
protected void render(SourceFileSet sources)

Inherited functions

Link copied to clipboard
protected final ClassName classNameOf(TypeName type, FilePath declaredIn)
Link copied to clipboard
public final T configAs<T>(Class<T> cls)
Link copied to clipboard
public final boolean configIsPresent()
Link copied to clipboard
public final BoundedContext getProtoDataContext$compiler()
Link copied to clipboard
protected final Path javaFileOf(TypeName type, FilePath declaredIn)
Link copied to clipboard
public final void renderSources$compiler(SourceFileSet sources)
Link copied to clipboard
public final QueryingClient<P> select<P extends EntityState<? extends Object>>(Class<P> type)
Link copied to clipboard
public final void setProtoDataContext$compiler(BoundedContext p)