diff options
author | Andrew Phillips <demobox1@yahoo.co.uk> | 2012-12-31 13:09:04 +0000 |
---|---|---|
committer | Andrew Phillips <demobox1@yahoo.co.uk> | 2013-04-22 19:31:29 +0200 |
commit | 6f47cafcd3e62714e81aa30e940d63043cb61e64 (patch) | |
tree | 6e27f4ba3e200d05a508dfe4a25740fa676070ef /src/library | |
parent | 240fa301614e591e7684211642fedb4863b57a5c (diff) | |
download | scala-6f47cafcd3e62714e81aa30e940d63043cb61e64.tar.gz scala-6f47cafcd3e62714e81aa30e940d63043cb61e64.tar.bz2 scala-6f47cafcd3e62714e81aa30e940d63043cb61e64.zip |
SI-6898 Document AnyVal box and unbox implemention by BoxesRunTime
- Added @boxRunTimeDoc@ and @unboxRunTimeDoc@ tokens to AnyVals
- Doc comments refer to BoxesRunTime.java in the Scala repo
- No comment for Unit
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Boolean.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Byte.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Char.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Double.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Float.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Int.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Long.scala | 4 | ||||
-rw-r--r-- | src/library/scala/Short.scala | 4 |
8 files changed, 32 insertions, 0 deletions
diff --git a/src/library/scala/Boolean.scala b/src/library/scala/Boolean.scala index d51afdd931..ddd11257c6 100644 --- a/src/library/scala/Boolean.scala +++ b/src/library/scala/Boolean.scala @@ -116,6 +116,8 @@ object Boolean extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToBoolean`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Boolean to be boxed * @return a java.lang.Boolean offering `x` as its underlying value. */ @@ -125,6 +127,8 @@ object Boolean extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Boolean. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToBoolean`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Boolean to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Boolean * @return the Boolean resulting from calling booleanValue() on `x` diff --git a/src/library/scala/Byte.scala b/src/library/scala/Byte.scala index d1979236d3..2510e859c0 100644 --- a/src/library/scala/Byte.scala +++ b/src/library/scala/Byte.scala @@ -606,6 +606,8 @@ object Byte extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToByte`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Byte to be boxed * @return a java.lang.Byte offering `x` as its underlying value. */ @@ -615,6 +617,8 @@ object Byte extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Byte. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToByte`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Byte to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Byte * @return the Byte resulting from calling byteValue() on `x` diff --git a/src/library/scala/Char.scala b/src/library/scala/Char.scala index 00ddff5b3b..1c9a2ba44f 100644 --- a/src/library/scala/Char.scala +++ b/src/library/scala/Char.scala @@ -606,6 +606,8 @@ object Char extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToCharacter`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Char to be boxed * @return a java.lang.Character offering `x` as its underlying value. */ @@ -615,6 +617,8 @@ object Char extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Character. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToChar`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Character to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Character * @return the Char resulting from calling charValue() on `x` diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index 977ebd19d6..ce081bbec1 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -382,6 +382,8 @@ object Double extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToDouble`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Double to be boxed * @return a java.lang.Double offering `x` as its underlying value. */ @@ -391,6 +393,8 @@ object Double extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Double. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToDouble`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Double to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Double * @return the Double resulting from calling doubleValue() on `x` diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala index f67f45897f..4ff2d509b8 100644 --- a/src/library/scala/Float.scala +++ b/src/library/scala/Float.scala @@ -382,6 +382,8 @@ object Float extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToFloat`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Float to be boxed * @return a java.lang.Float offering `x` as its underlying value. */ @@ -391,6 +393,8 @@ object Float extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Float. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToFloat`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Float to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Float * @return the Float resulting from calling floatValue() on `x` diff --git a/src/library/scala/Int.scala b/src/library/scala/Int.scala index 1bacdbcee9..6a27195b10 100644 --- a/src/library/scala/Int.scala +++ b/src/library/scala/Int.scala @@ -606,6 +606,8 @@ object Int extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToInteger`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Int to be boxed * @return a java.lang.Integer offering `x` as its underlying value. */ @@ -615,6 +617,8 @@ object Int extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Integer. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToInt`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Integer to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Integer * @return the Int resulting from calling intValue() on `x` diff --git a/src/library/scala/Long.scala b/src/library/scala/Long.scala index 83adcda819..4d369ae010 100644 --- a/src/library/scala/Long.scala +++ b/src/library/scala/Long.scala @@ -606,6 +606,8 @@ object Long extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToLong`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Long to be boxed * @return a java.lang.Long offering `x` as its underlying value. */ @@ -615,6 +617,8 @@ object Long extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Long. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToLong`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Long to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Long * @return the Long resulting from calling longValue() on `x` diff --git a/src/library/scala/Short.scala b/src/library/scala/Short.scala index cdd298e542..4f91c51550 100644 --- a/src/library/scala/Short.scala +++ b/src/library/scala/Short.scala @@ -606,6 +606,8 @@ object Short extends AnyValCompanion { /** Transform a value type into a boxed reference type. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.boxToShort`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the Short to be boxed * @return a java.lang.Short offering `x` as its underlying value. */ @@ -615,6 +617,8 @@ object Short extends AnyValCompanion { * method is not typesafe: it accepts any Object, but will throw * an exception if the argument is not a java.lang.Short. * + * Runtime implementation determined by `scala.runtime.BoxesRunTime.unboxToShort`. See [[https://github.com/scala/scala src/library/scala/runtime/BoxesRunTime.java]]. + * * @param x the java.lang.Short to be unboxed. * @throws ClassCastException if the argument is not a java.lang.Short * @return the Short resulting from calling shortValue() on `x` |