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.
- Alphabetic
- By Inheritance
- ScalaExecutableValidator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
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( ... )
- 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.
-
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( ... )
- 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.
-
abstract
def
validateMethod[T](obj: T, method: Method, groups: Class[_]*): Set[ConstraintViolation[T]]
Validates the given method annotated with
@MethodValidationof the given object.Validates the given method annotated with
@MethodValidationof the given object.- T
the type hosting the method to validate.
- obj
the object on which the method to validate is invoked.
- method
the
@MethodValidationannotated 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( ... )
- 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.
-
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( ... )
- 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.
-
abstract
def
validateMethods[T](obj: T, groups: Class[_]*): Set[ConstraintViolation[T]]
Validates all methods annotated with
@MethodValidationof the given object.Validates all methods annotated with
@MethodValidationof 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( ... )
- Exceptions thrown
IllegalArgumentException- if null is passed for the object to validate.ValidationException- if a non recoverable error happens during the validation process.
-
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( ... )
- 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.
-
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( ... )
- 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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()