object CompileTimeAssertions extends CompileTimeAssertions

Companion object that facilitates the importing of CompileTimeAssertions members as an alternative to mixing in the trait.

Source
CompileTimeAssertions.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompileTimeAssertions
  2. CompileTimeAssertions
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def ensureValidCharLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[Char], notValidMsg: String, notLiteralMsg: String)(isValid: (Char) => Boolean): Unit

    Ensures a given expression of type Char is a literal with a valid value according to a given validation function.

    Ensures a given expression of type Char is a literal with a valid value according to a given validation function.

    If the given Char expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given Char expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given Char expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the Char expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  7. def ensureValidDoubleLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[Double], notValidMsg: String, notLiteralMsg: String)(isValid: (Double) => Boolean): Unit

    Ensures a given expression of type Double is a literal with a valid value according to a given validation function.

    Ensures a given expression of type Double is a literal with a valid value according to a given validation function.

    If the given Double expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given Double expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given Double expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the Double expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  8. def ensureValidFloatLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[Float], notValidMsg: String, notLiteralMsg: String)(isValid: (Float) => Boolean): Unit

    Ensures a given expression of type Float is a literal with a valid value according to a given validation function.

    Ensures a given expression of type Float is a literal with a valid value according to a given validation function.

    If the given Float expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given Float expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given Float expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the Float expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  9. def ensureValidIntLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[Int], notValidMsg: String, notLiteralMsg: String)(isValid: (Int) => Boolean): Unit

    Ensures a given expression of type Int is a literal with a valid value according to a given validation function.

    Ensures a given expression of type Int is a literal with a valid value according to a given validation function.

    If the given Int expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given Int expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given Int expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the Int expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  10. def ensureValidLongLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[Long], notValidMsg: String, notLiteralMsg: String)(isValid: (Long) => Boolean): Unit

    Ensures a given expression of type Long is a literal with a valid value according to a given validation function.

    Ensures a given expression of type Long is a literal with a valid value according to a given validation function.

    If the given Long expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given Long expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given Long expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the Long expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  11. def ensureValidStringLiteral(c: Context)(value: scala.reflect.macros.whitebox.Context.Expr[String], notValidMsg: String, notLiteralMsg: String)(isValid: (String) => Boolean): Unit

    Ensures a given expression of type String is a literal with a valid value according to a given validation function.

    Ensures a given expression of type String is a literal with a valid value according to a given validation function.

    If the given String expression is a literal whose value satisfies the given validation function, this method will return normally. Otherwise, if the given String expression is not a literal, this method will complete abruptly with an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the given String expression is a literal that does not satisfy the given validation function, so this method will complete abruptly with an exception whose detail message includes the String passed as notValidMsg.

    This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.

    c

    the compiler context for this assertion

    value

    the String expression to validate

    notValidMsg

    a String message to include in the exception thrown if the expression is a literal, but not valid

    notLiteralMsg

    a String message to include in the exception thrown if the expression is not a literal

    isValid

    a function used to validate a literal value parsed from the given expression

    Definition Classes
    CompileTimeAssertions
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from CompileTimeAssertions

Inherited from AnyRef

Inherited from Any

Ungrouped