Package graphql.validation
Class ValidationErrorCollector
- java.lang.Object
-
- graphql.validation.ValidationErrorCollector
-
public class ValidationErrorCollector extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ValidationErrorCollector()
ValidationErrorCollector(int maxErrors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(ValidationError validationError)
This will throwValidationErrorCollector.MaxValidationErrorsReached
if too many validation errors are addedboolean
containsValidationError(ValidationErrorType validationErrorType)
boolean
containsValidationError(ValidationErrorType validationErrorType, java.lang.String description)
java.util.List<ValidationError>
getErrors()
java.lang.String
toString()
-
-
-
Method Detail
-
addError
public void addError(ValidationError validationError) throws graphql.validation.ValidationErrorCollector.MaxValidationErrorsReached
This will throwValidationErrorCollector.MaxValidationErrorsReached
if too many validation errors are added- Parameters:
validationError
- the error to add- Throws:
graphql.validation.ValidationErrorCollector.MaxValidationErrorsReached
- if too many errors have been generated
-
getErrors
public java.util.List<ValidationError> getErrors()
-
containsValidationError
public boolean containsValidationError(ValidationErrorType validationErrorType)
-
containsValidationError
public boolean containsValidationError(ValidationErrorType validationErrorType, java.lang.String description)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-