Packages

o

com.wix.accord

Descriptions

object Descriptions

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Descriptions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait AssociativeDescription extends Description

    Trait for descriptions that are associated with another element (for example, indexed sequence access).

  2. 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.

  3. sealed trait Description extends AnyRef

    Root trait whose various cases describe a single Object Under Validation (OUV).

  4. case class Explicit(description: String) extends Description with Product with Serializable

    Denotes an explicit textual description, typically provided via the DSL as keyword.

  5. 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).

  6. 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).

  7. 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").

  8. 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

  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( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): 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[_]
    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. def render(path: Path): String

    Generates a textual representation of the specified path.

  16. def render(description: Description): String

    Generates a textual representation of the specified description.

  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. object AccessChain
  23. object Conditional
  24. object Path

Deprecated Value Members

  1. val SelfReference: Path
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7) SelfReference is deprecated; use com.wix.accord.Descriptions.Path.empty instead

  2. 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

Inherited from AnyRef

Inherited from Any

Ungrouped