Class ValidationErrorUtils


  • public final class ValidationErrorUtils
    extends Object
    Validation error utility methods.
    Author:
    nhant01, GeorgeLuo
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static dev.amp.validator.ValidatorProtos.ValidationError populateError​(dev.amp.validator.ValidatorProtos.ValidationError.Severity severity, dev.amp.validator.ValidatorProtos.ValidationError.Code validationErrorCode, int line, int column, List<String> params, String specUrl)
      Construct a ValidationError object from the given argument list.
      static dev.amp.validator.ValidatorProtos.ValidationError populateError​(dev.amp.validator.ValidatorProtos.ValidationError.Severity severity, dev.amp.validator.ValidatorProtos.ValidationError.Code validationErrorCode, Locator lineCol, List<String> params, String specUrl)
      Construct a ValidationError object from the given argument list.
    • Method Detail

      • populateError

        public static dev.amp.validator.ValidatorProtos.ValidationError populateError​(@Nonnull
                                                                                      dev.amp.validator.ValidatorProtos.ValidationError.Severity severity,
                                                                                      @Nonnull
                                                                                      dev.amp.validator.ValidatorProtos.ValidationError.Code validationErrorCode,
                                                                                      @Nonnull
                                                                                      Locator lineCol,
                                                                                      @Nonnull
                                                                                      List<String> params,
                                                                                      @Nonnull
                                                                                      String specUrl)
        Construct a ValidationError object from the given argument list.
        Parameters:
        severity - the severity.
        validationErrorCode - Error code.
        lineCol - a line / column pair.
        params - the list of params.
        specUrl - a link (URL) to the amphtml spec.
        Returns:
        returns the ValidationError instance.
      • populateError

        public static dev.amp.validator.ValidatorProtos.ValidationError populateError​(@Nonnull
                                                                                      dev.amp.validator.ValidatorProtos.ValidationError.Severity severity,
                                                                                      @Nonnull
                                                                                      dev.amp.validator.ValidatorProtos.ValidationError.Code validationErrorCode,
                                                                                      int line,
                                                                                      int column,
                                                                                      @Nonnull
                                                                                      List<String> params,
                                                                                      @Nonnull
                                                                                      String specUrl)
        Construct a ValidationError object from the given argument list.
        Parameters:
        severity - the severity.
        validationErrorCode - Error code.
        line - a line number.
        column - a column number.
        params - the list of params.
        specUrl - a link (URL) to the amphtml spec.
        Returns:
        returns the ValidationError instance.