object Descriptions
- Alphabetic
- By Inheritance
- Descriptions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
sealed
trait
AssociativeDescription extends Description
Trait for descriptions that are associated with another element (for example, indexed sequence access).
-
case class
Branch(guard: Generic, evaluation: Boolean) extends AssociativeDescription with Product with Serializable
Denotes that the desirable validation strategy depends of the result of an
if
statement.Denotes that the desirable validation strategy depends of the result of an
if
statement.For example, the following rule:
if (person.age < 18) person.guardian is notEmpty else person.residencyAddress is notEmpty
May evaluate to either of the following descriptions: - Branch( guard = Generic( "age < 18" ), evaluation = true ) - Branch( guard = Generic( "age < 18" ), evaluation = false )
- guard
Describes the specified branch condition.
- evaluation
THe result of evaluating the branch condition.
-
sealed
trait
Description extends AnyRef
Root trait whose various cases describe a single Object Under Validation (OUV).
-
case class
Explicit(description: String) extends Description with Product with Serializable
Denotes an explicit textual description, typically provided via the DSL
as
keyword. -
case class
Generic(description: String) extends Description with Product with Serializable
Denotes a generic textual description, typically a piece of code, where a better description could not be generated (for example: the field name as part of an com.wix.accord.Descriptions.AccessChain).
-
case class
Indexed(index: Long) extends AssociativeDescription with Product with Serializable
Denotes an index access (e.g.
Denotes an index access (e.g. accessing the nth element of an array).
-
type
Path = Seq[Description]
Describes a "path" through the object graph, from the root to a specific object under validation.
Describes a "path" through the object graph, from the root to a specific object under validation. The empty path refers to the root object itself (a "self reference").
-
case class
PatternMatch(on: Path, value: Any, guard: Option[Generic]) extends AssociativeDescription with Product with Serializable
Denotes that the desirable validation strategy depends on the result of a pattern match.
Denotes that the desirable validation strategy depends on the result of a pattern match.
For example, the following rule:
person.age match { case age if age < 18 => person.guardian is notEmpty case age if age >= 18 => person.residencyAddress is notEmpty }
May evaluate to either of the following descriptions: - PatternMatch( on = AccessChain( "age" ), value = -5, guard = Some( Generic( "age < 18" ) ) ) - PatternMatch( on = AccessChain( "age" ), value = 55, guard = Some( Generic( "age >= 18" ) ) )
- on
Describes the expression being matched on.
- value
The value of the expression being matched on.
- guard
Describes the guard (
if
clause) of the matching case, if applicable.
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()
-
def
render(path: Path): String
Generates a textual representation of the specified path.
-
def
render(description: Description): String
Generates a textual representation of the specified description.
-
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()
- object AccessChain
- object Conditional
- object Path
Deprecated Value Members
-
val
SelfReference: Path
- Annotations
- @deprecated
- Deprecated
(Since version 0.7) SelfReference is deprecated; use com.wix.accord.Descriptions.Path.empty instead
-
implicit
def
descriptionToPath(description: Description): Path
- Annotations
- @deprecated
- Deprecated
(Since version 0.7) Descriptions no longer describe full paths; use com.wix.accord.Descriptions.Path.apply instead