Packages

t

com.twitter.util.validation.executable

ScalaExecutableValidator

trait ScalaExecutableValidator extends AnyRef

Scala version of the Bean Specification jakarta.validation.executable.ExecutableValidator.

Validates parameters and return values of methods and constructors. Implementations of this interface must be thread-safe.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaExecutableValidator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def validateConstructorParameters[T](constructor: Constructor[T], parameterValues: Array[Any], groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all constraints placed on the parameters of the given constructor.

    Validates all constraints placed on the parameters of the given constructor.

    T

    the type hosting the constructor to validate.

    constructor

    the constructor for which the parameter constraints is validated.

    parameterValues

    the values provided by the caller for the given constructor's parameters.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; Will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other.

    ValidationException - if a non recoverable error happens during the validation process.

  2. abstract def validateConstructorReturnValue[T](constructor: Constructor[T], createdObject: T, groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all return value constraints of the given constructor.

    Validates all return value constraints of the given constructor.

    T

    the type hosting the constructor to validate.

    constructor

    the constructor for which the return value constraints is validated.

    createdObject

    the object instantiated by the given method.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; will be empty, if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other.

    ValidationException - if a non recoverable error happens during the validation process.

  3. abstract def validateMethod[T](obj: T, method: Method, groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates the given method annotated with @MethodValidation of the given object.

    Validates the given method annotated with @MethodValidation of the given object.

    T

    the type hosting the method to validate.

    obj

    the object on which the method to validate is invoked.

    method

    the @MethodValidation annotated method to invoke for validation.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for the object to validate or if the given method is not a method of the object class type.

    ValidationException - if a non recoverable error happens during the validation process.

  4. abstract def validateMethodParameters[T](method: Method, parameterValues: Array[Any], groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all constraints placed on the parameters of the given method.

    Validates all constraints placed on the parameters of the given method.

    T

    the type defining the method to validate.

    method

    the method for which the parameter constraints is validated.

    parameterValues

    the values provided by the caller for the given method's parameters.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; Will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other.

    ValidationException - if a non recoverable error happens during the validation process.

  5. abstract def validateMethods[T](obj: T, groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all methods annotated with @MethodValidation of the given object.

    Validates all methods annotated with @MethodValidation of the given object.

    T

    the type hosting the methods to validate.

    obj

    the object on which the methods to validate are invoked.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for the object to validate.

    ValidationException - if a non recoverable error happens during the validation process.

  6. abstract def validateParameters[T](obj: T, method: Method, parameterValues: Array[Any], groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all constraints placed on the parameters of the given method.

    Validates all constraints placed on the parameters of the given method.

    T

    the type hosting the method to validate.

    obj

    the object on which the method to validate is invoked.

    method

    the method for which the parameter constraints is validated.

    parameterValues

    the values provided by the caller for the given method's parameters.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other.

    ValidationException - if a non recoverable error happens during the validation process.

  7. abstract def validateReturnValue[T](obj: T, method: Method, returnValue: Any, groups: Class[_]*): Set[ConstraintViolation[T]]

    Validates all return value constraints of the given method.

    Validates all return value constraints of the given method.

    T

    the type hosting the method to validate.

    obj

    the object on which the method to validate is invoked.

    method

    the method for which the return value constraints is validated.

    returnValue

    the value returned by the given method.

    groups

    the list of groups targeted for validation (defaults to Default).

    returns

    a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null.

    Annotations
    @throws(scala.this.throws.<init>$default$1[jakarta.validation.ValidationException])
    Exceptions thrown

    IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other.

    ValidationException - if a non recoverable error happens during the validation process.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped