com.wix.accord

transform

package transform

Visibility
  1. Public
  2. All

Type Members

  1. trait ExpressionDescriber[C <: Context] extends MacroHelper[C] with PatternHelper[C]

    A macro helper trait that generates implicit description for expressions.

    A macro helper trait that generates implicit description for expressions. The transformation operates in the context of a function of the form Function1[ T, U ], or in other words only supports single-parameter functions.

    The expression is transformable via com.wix.accord.transform.ExpressionDescriber.renderDescriptionTree based on the following rules:

    • Selectors over the function prototype are rewritten to the selected expression; for example, { p: Person => p.firstName } gets rewritten to a tree representing the string literal "firstName"
    • Explicitly described expressions (via com.wix.accord.dsl.Descriptor) are rewritten to a tree representing the description as a string literal, for example { p: Person => p.firstName as "first name" } gets rewritten simply as "first name"
    • Any other expression is rewritten as tree representing a string literal of the expression itself, for example { _ => 1 + 2 + 3 } gets rewritten as "1 + 2 + 3".
    C

    The macro context type

  2. trait MacroHelper[C <: Context] extends AnyRef

  3. trait PatternHelper[C <: Context] extends AnyRef

    A macro helper mixin that provides simplified, pattern-based AST operations.

    A macro helper mixin that provides simplified, pattern-based AST operations.

    C

    The type of the macro context

Value Members

  1. object MacroHelper

  2. object ValidationTransform

Ungrouped