trait Spells extends AnsiModule with AnyOpsModule with CalendarOpsModule with ClearPrintModule with ClipboardModule with CustomRenderingModule with DateOpsModule with DurationOpsModule with FunctionNOpsModule with HumanRenderingModule with IterableOpsModule with LazyListOpsModule with MiscModule with SpellsConfigModule with StackTraceElementModule with StringOpsModule with StylePrintModule with ThrowableOpsModule with Tuple2OpsModule with XrayModule
The main spells module.
Mix it into the highest level package object
you can afford,
in order to gain the most benefit from spells.
- Alphabetic
- By Inheritance
- Spells
- XrayModule
- Tuple2OpsModule
- ThrowableOpsModule
- StylePrintModule
- StringOpsModule
- StackTraceElementModule
- SpellsConfigModule
- LocationAwarePropertyModule
- LocationAwareConfigModule
- MiscModule
- LazyListOpsModule
- IterableOpsModule
- HumanRenderingModule
- FunctionNOpsModule
- DurationOpsModule
- DateOpsModule
- CustomRenderingModule
- ClipboardModule
- ClearPrintModule
- CalendarOpsModule
- AnyOpsModule
- AnsiModule
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit final class AnsiString extends AnyRef
Provides the method
in
which convertsAny
toString
in
AnsiStyle
.Provides the method
in
which convertsAny
toString
in
AnsiStyle
. Also provides convenience methods likegreen
,yellow
etc.- Definition Classes
- AnsiModule
- final class AnsiStyle extends AnyRef
Encoding of
AnsiStyle
sEncoding of
AnsiStyle
s- Definition Classes
- AnsiModule
- implicit final class AnsiStyleBuilder extends AnyRef
Provides method
toAnsiStyle
which converts ansi codes toAnsiStyle
.Provides method
toAnsiStyle
which converts ansi codes toAnsiStyle
. Understands human readable styles like "Green" or "Random".- Definition Classes
- AnsiModule
- See also
https://en.wikipedia.org/wiki/ANSI_escape_code
- implicit final class AnyOpsFromSpells extends AnyRef
- Definition Classes
- AnyOpsModule
- implicit final class CalendarOpsFromSpells extends (CalendarOpsModule.this)#CustomRendering
- Definition Classes
- CalendarOpsModule
- trait CustomRendering extends AnyRef
- Definition Classes
- CustomRenderingModule
- implicit final class DateOpsFromSpells extends (DateOpsModule.this)#CustomRendering
- Definition Classes
- DateOpsModule
- implicit final class DurationOpsFromSpells extends (DurationOpsModule.this)#CustomRendering
- Definition Classes
- DurationOpsModule
- implicit final class Function0OpsFromSpells[R, F[_]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function10OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R, F[_, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function11OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, R, F[_, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function12OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function13OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function14OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function15OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function16OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function17OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function18OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function19OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function20OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function21OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function22OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, R, F[_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function2OpsFromSpells[T1, T2, R, F[_, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function3OpsFromSpells[T1, T2, T3, R, F[_, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function4OpsFromSpells[T1, T2, T3, T4, R, F[_, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function5OpsFromSpells[T1, T2, T3, T4, T5, R, F[_, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function6OpsFromSpells[T1, T2, T3, T4, T5, T6, R, F[_, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function7OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, R, F[_, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function8OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, R, F[_, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- implicit final class Function9OpsFromSpells[T1, T2, T3, T4, T5, T6, T7, T8, T9, R, F[_, _, _, _, _, _, _, _, _, _]] extends (FunctionNOpsModule.this)#TypeTagBasedCustomRendering
- Definition Classes
- FunctionNOpsModule
- abstract class TypeTagBasedCustomRendering extends (FunctionNOpsModule.this)#CustomRendering
- Definition Classes
- FunctionNOpsModule
- case class Rendering(value: Long) extends Product with Serializable
- Definition Classes
- HumanRenderingModule
- abstract class LocationAwareProperty[T] extends AnyRef
- Definition Classes
- LocationAwarePropertyModule
- implicit final class StackTraceElementOpsFromSpells extends (StackTraceElementModule.this)#CustomRendering
- Definition Classes
- StackTraceElementModule
- final class AvailableWidthInCharacters extends AnyRef
- Definition Classes
- StringOpsModule
- implicit final class StringOpsFromSpells extends AnyRef
- Definition Classes
- StringOpsModule
- implicit final class ThrowableOpsFromSpells extends (ThrowableOpsModule.this)#CustomRendering
- Definition Classes
- ThrowableOpsModule
- implicit final class Description extends AnyRef
A wrapper for
String
s, provided so that it can be used as animplicit
parameter, whichString
s are not ideal for.A wrapper for
String
s, provided so that it can be used as animplicit
parameter, whichString
s are not ideal for.- Definition Classes
- XrayModule
- implicit final class IncreaseStackTraceDepthBy extends AnyRef
A wrapper for
Int
s, provided so that it can be used as animplicit
parameter, whichInt
s are not ideal for.A wrapper for
Int
s, provided so that it can be used as animplicit
parameter, whichInt
s are not ideal for.- Definition Classes
- XrayModule
- implicit final class XrayFromSpells[T] extends AnyRef
Implicit conversion from
T
toXrayFromSpells
, which contains methods likexray
andxrayIf
.Implicit conversion from
T
toXrayFromSpells
, which contains methods likexray
andxrayIf
.- T
the type, your expression evaluates to
- Definition Classes
- XrayModule
- final class XrayReport[+T] extends (XrayModule.this)#CustomRendering
Instances of this class are created by methods like
xray
orxrayIf
.Instances of this class are created by methods like
xray
orxrayIf
. They are used to describe evaluated expressions and can be rendered as a table.- Definition Classes
- XrayModule
- implicit final class XrayWeakFromSpells[T] extends AnyRef
- Definition Classes
- XrayModule
Value Members
- object AnsiStyle
Provides out-of-the-box
AnsiStyle
s as well as a utility method to remove them.Provides out-of-the-box
AnsiStyle
s as well as a utility method to remove them.- Definition Classes
- AnsiModule
- object ClearPrint
- Definition Classes
- ClearPrintModule
- object Clipboard
Utility object, which provides an API to write and read from the operating systems' clipboard.
Utility object, which provides an API to write and read from the operating systems' clipboard.
- Definition Classes
- ClipboardModule
- object CustomRendering
- Definition Classes
- CustomRenderingModule
- object DateOpsFromSpells
- Definition Classes
- DateOpsModule
- 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
- implicit final def ArrayOpsFromSpells[A, T[A] <: Array[A]](value: T[A])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T[A]], rendering: (A) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- IterableOpsModule
- implicit final def CollectionOpsFromSpells[A, T[A] <: Collection[A]](value: T[A])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T[A]], rendering: (A) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- IterableOpsModule
- implicit final def IterableOpsFromSpells[A, T[A] <: Iterable[A]](value: T[A])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T[A]], rendering: (A) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- IterableOpsModule
- implicit final def JavaMapOpsFromSpells[Key, Value, T[Key, Value] <: Map[Key, Value]](value: T[Key, Value])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T[Key, Value]], rendering: (Entry[Key, Value]) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- IterableOpsModule
- def MakeLazyList[E](elements: Function0Wrapper[E]*): LazyList[E]
Creates a
LazyList
consisting of given elements.Creates a
LazyList
consisting of given elements. In contrast to the LazyList factory from the standard library each element is evaluated on demand.- Definition Classes
- LazyListOpsModule
- implicit final def MapEntryOpsFromSpells[Key, Value](entry: Entry[Key, Value])(implicit keyRendering: (Key) => CustomRendering = CustomRendering.Defaults.Any, valueRendering: (Value) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- Tuple2OpsModule
- implicit final def MapOpsFromSpells[Key, Value, T[Key, Value] <: Map[Key, Value]](value: T[Key, Value])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T[Key, Value]], rendering: ((Key, Value)) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- IterableOpsModule
- implicit final def Tuple2OpsFromSpells[Key, Value](tuple: (Key, Value))(implicit keyRendering: (Key) => CustomRendering = CustomRendering.Defaults.Any, valueRendering: (Value) => CustomRendering = CustomRendering.Defaults.Any): CustomRendering
- Definition Classes
- Tuple2OpsModule
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit final def availableWidthInCharactersBackToInt(availableWidthInCharacters: AvailableWidthInCharacters): Int
- Definition Classes
- StringOpsModule
- implicit def byNameToFunction0Wrapper[E](byName: => E): Function0Wrapper[E]
- Definition Classes
- LazyListOpsModule
- implicit final def byteToRendering(value: Byte): Rendering
- Definition Classes
- HumanRenderingModule
- final def clearPrint(input: Any = "")(implicit style: AnsiStyle = AnsiStyle.Reset): Unit
Prints an object to out using its toString method, beginning at the first character in the current line of your terminal.
Prints an object to out using its toString method, beginning at the first character in the current line of your terminal.
- input
the object to print
- style
custom
AnsiStyle
- Definition Classes
- ClearPrintModule
- final def clearPrintln(input: Any = "")(implicit style: AnsiStyle = AnsiStyle.Reset): Unit
Prints out an object to the default output, beginning at the first character in the current line of your terminal, followed by a newline character.
Prints out an object to the default output, beginning at the first character in the current line of your terminal, followed by a newline character.
- input
the object to print
- style
custom
AnsiStyle
- Definition Classes
- ClearPrintModule
- final def cleared(input: Any = "")(implicit style: AnsiStyle = AnsiStyle.Reset): String
Moves the caret to the beginning of the line.
Moves the caret to the beginning of the line.
- input
the object to be moved to the beginning of the line
- style
custom
AnsiStyle
- returns
the object, which when printing will begin at the first character in the current line of your terminal.
- Definition Classes
- ClearPrintModule
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def currentLineStackTraceElement(implicit increaseStackTraceDepthBy: IncreaseStackTraceDepthBy = 0): StackTraceElement
Creates an instance of
StackTraceElement
at current line.Creates an instance of
StackTraceElement
at current line.- increaseStackTraceDepthBy
adjust if you build a library around it and the line stopps matching
- returns
an instance of
StackTraceElement
at current line.
- Definition Classes
- XrayModule
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def erred(error: Any): String
Styles
Any in Red
. - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- implicit final def intToRendering(value: Int): Rendering
- Definition Classes
- HumanRenderingModule
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def loadSpellsConfig: Config
- Attributes
- protected
- Definition Classes
- LocationAwareConfigModule
- implicit final def longToRendering(value: Long): Rendering
- Definition Classes
- HumanRenderingModule
- final def measureExecutionTime[T](expression: => T): (T, Duration)
Measures the execution time of an expression.
Measures the execution time of an expression.
- T
the result type of the expression
- expression
the expression to be measured
- returns
a Tuple2 with the value of the expression and it's execution time
- Definition Classes
- MiscModule
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def noop[T]: (T) => Unit
This method is similar to the
identity
method from the Scala standard library, but this one does not return anything.This method is similar to the
identity
method from the Scala standard library, but this one does not return anything.- T
input type
- returns
()
- Definition Classes
- MiscModule
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def print(input: Any = "")(implicit style: AnsiStyle = AnsiStyle.Reset): Unit
Prints an object to out using its toString method.
Prints an object to out using its toString method.
- input
the object to print; may be null
- style
the style for the object to be printed in
- Definition Classes
- StylePrintModule
- final def printerr(error: Any): Unit
Write to the
err
stream inAnsiStyle.Red
.Write to the
err
stream inAnsiStyle.Red
.- error
which will be written to the stream
- Definition Classes
- StylePrintModule
- final def println(input: Any = "")(implicit style: AnsiStyle = AnsiStyle.Reset): Unit
Prints out an object to the default output, followed by a newline character.
Prints out an object to the default output, followed by a newline character.
- input
the object to print
- style
the style for the object to be printed in
- Definition Classes
- StylePrintModule
- implicit final def shortToRendering(value: Short): Rendering
- Definition Classes
- HumanRenderingModule
- final lazy val spellsConfig: Config
- Definition Classes
- LocationAwareConfigModule
- final def styled(input: Any)(implicit style: AnsiStyle = AnsiStyle.Reset): String
Styled an object in a given style.
Styled an object in a given style. Involves deep (already existing styles will be preserved) styling.
styled("green" + "yellow".yellow + "green")(Green) // yellow is preserved
- input
the object to print
- style
the style for the object to be printed in
- returns
the styled object as
String
- Definition Classes
- StylePrintModule
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit final def toAvailableWidthInCharacters(value: Int): AvailableWidthInCharacters
A wrapper for
Int
s, provided so that it can be used as animplicit
parameter, whichInt
s are not ideal for.A wrapper for
Int
s, provided so that it can be used as animplicit
parameter, whichInt
s are not ideal for.- value
the
Int
to be wrapped.
- Definition Classes
- StringOpsModule
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def xrayed[T](expression: => T, description: Description = Xray.Defaults.Description, increaseStackTraceDepthBy: Int = Xray.Defaults.StackTraceDepthOffset)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T], style: AnsiStyle = AnsiStyle.Reset, rendering: (T) => CustomRendering = CustomRendering.Defaults.Any): XrayReport[T]
Creates an instance of
XrayReport
.Creates an instance of
XrayReport
. Primarily useful for library authors.- T
the type, your expression evaluates to
- expression
the expression to be evaluated
- description
an optional description
- increaseStackTraceDepthBy
the depth can be used in certain cases when you want to write your own library and have issues with line numberes jumping around
- typeTag
the typeTag injected by the compiler
- style
outer style for the report
- rendering
custom rendering for
T
- returns
an instance of
XrayReport
, which can be rendered or written to a database etc etc
- Definition Classes
- XrayModule
- final def xrayedWeak[T](expression: => T, description: Description = Xray.Defaults.Description, increaseStackTraceDepthBy: Int = Xray.Defaults.StackTraceDepthOffset)(implicit style: AnsiStyle = AnsiStyle.Reset): XrayReport[T]
Creates an instance of
XrayReport
.Creates an instance of
XrayReport
. Primarily useful for library authors.- T
the type, your expression evaluates to
- expression
the expression to be evaluated
- description
an optional description
- increaseStackTraceDepthBy
the depth can be used in certain cases when you want to write your own library and have issues with line numberes jumping around
- style
outer style for the report
- returns
an instance of
XrayReport
, which can be rendered or written to a database etc etc
- Definition Classes
- XrayModule
- object SpellsConfig
- Definition Classes
- SpellsConfigModule
- object StylePrint
- Definition Classes
- StylePrintModule
- object Xray
- Definition Classes
- XrayModule