Object

com.wix.accord

Descriptions

Related Doc: package accord

Permalink

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

    Permalink

    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

    Permalink

    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

    Permalink

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

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

    Permalink

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

  5. case class Generic(description: String) extends Description with Product with Serializable

    Permalink

    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

    Permalink

    Denotes an index access (e.g.

    Denotes an index access (e.g. accessing the nth element of an array).

  7. type Path = Seq[Description]

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object AccessChain

    Permalink
  5. object Conditional

    Permalink
  6. object Path

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def render(path: Path): String

    Permalink

    Generates a textual representation of the specified path.

  19. def render(description: Description): String

    Permalink

    Generates a textual representation of the specified description.

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. val SelfReference: Path

    Permalink
    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

    Permalink
    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