ScalaRunTime
The object ScalaRunTime provides support methods required by the scala runtime. All these methods should be considered outside the API and subject to change or removal without notice.
Attributes
- Source
- ScalaRunTime.scala
- Graph
-
- Supertypes
- Self type
-
ScalaRunTime.type
Members list
Value members
Concrete methods
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Returns the class object representing an unboxed value type, e.g., classOf[int], not classOf[java.lang.Integer]. The compiler rewrites expressions like 5.getClass to come here.
Returns the class object representing an unboxed value type, e.g., classOf[int], not classOf[java.lang.Integer]. The compiler rewrites expressions like 5.getClass to come here.
Type parameters
- T
-
the value type whose runtime class is retrieved
Value parameters
- value
-
the boxed value whose unboxed class is returned
Attributes
- Returns
-
the runtime
Classrepresenting the unboxed typeT - Source
- ScalaRunTime.scala
Returns the class object representing an array with element class clazz.
Returns the class object representing an array with element class clazz.
Value parameters
- clazz
-
the element class of the desired array type
Attributes
- Returns
-
the
Classobject representingArray[clazz] - Source
- ScalaRunTime.scala
Retrieves generic array element.
Retrieves generic array element.
Value parameters
- idx
-
the index of the element to retrieve
- xs
-
the array to read from (typed as
AnyRefto support both reference and primitive arrays)
Attributes
- Returns
-
the element at position
idxin the array - Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Gets generic array length.
Gets generic array length.
Value parameters
- xs
-
the array to measure, as an
AnyRef
Attributes
- Returns
-
the number of elements in the array
- Source
- ScalaRunTime.scala
Updates generic array element.
Updates generic array element.
Value parameters
- idx
-
the index of the element to set
- value
-
the value to store at the given index
- xs
-
the array to update (typed as
AnyRefto support both reference and primitive arrays)
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
stringOf formatted for use in a repl result.
stringOf formatted for use in a repl result.
Value parameters
- arg
-
the value to convert to its string representation
- maxElements
-
the maximum number of collection elements to include
Attributes
- Returns
-
a string representation of
arg, formatted for REPL display - Source
- ScalaRunTime.scala
Given any Scala value, convert it to a String.
Given any Scala value, convert it to a String.
The primary motivation for this method is to provide a means for correctly obtaining a String representation of a value, while avoiding the pitfalls of naively calling toString on said value. In particular, it addresses the fact that (a) toString cannot be called on null and (b) depending on the apparent type of an array, toString may or may not print it in a human-readable form.
Value parameters
- arg
-
the value to stringify
Attributes
- Returns
-
a string representation of arg.
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Converts an array to an object array. Needed to deal with vararg arguments of primitive types that are passed to a generic Java vararg parameter T ...
Converts an array to an object array. Needed to deal with vararg arguments of primitive types that are passed to a generic Java vararg parameter T ...
Value parameters
- src
-
the source array to convert, which may be a primitive array
Attributes
- Returns
-
an
Array[Object]containing the (boxed) elements ofsrc - Source
- ScalaRunTime.scala
A helper for case classes.
A helper for case classes.
Type parameters
- T
-
the expected element type; elements are cast to this type without checking
Value parameters
- x
-
the product whose elements are iterated over
Attributes
- Returns
-
an iterator over the product's elements, cast to type
T - Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala
Attributes
- Source
- ScalaRunTime.scala