Class ExtraValidation

  • All Implemented Interfaces:
    io.spine.protodata.renderer.InsertionPoint

    public final class ExtraValidation
    extends Object
    implements io.spine.protodata.renderer.InsertionPoint
    An insertion point at the place where users may add some extra validation code to the one already generated by the standard JavaValidationRenderer.

    Goes after all the standard validation checks but before returning/throwing the resulting error.

    • Constructor Detail

      • ExtraValidation

        public ExtraValidation​(io.spine.protodata.TypeName name)
        Creates a new instance for the given type.
    • Method Detail

      • getLabel

        public String getLabel()
        Specified by:
        getLabel in interface io.spine.protodata.renderer.InsertionPoint
      • locate

        public io.spine.protodata.renderer.LineNumber locate​(List<String> list)
        Does not try to locate the point.

        This insertion point is printed as a part of the code generated by the JavaValidationRenderer. So we never require locating it in code. Thus, this method always returns LineNumber.notInFile().

        Specified by:
        locate in interface io.spine.protodata.renderer.InsertionPoint