diff options
author | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 01:43:13 -0800 |
---|---|---|
committer | Haoyi Li <haoyi@haoyi-mbp.corp.dropbox.com> | 2014-11-26 01:43:13 -0800 |
commit | 0489a0d6c8d3beceeedb8c2f6eaad7b9387073c0 (patch) | |
tree | 95efbc083dee7d9ce8211d44d3f98c4a34c26ad4 /book/src/main/scalatex/book/indepth/JavaAPIs.scalatex | |
parent | 88595a41e3ec13c1a516e847fe3d0b279facf3fc (diff) | |
download | hands-on-scala-js-0489a0d6c8d3beceeedb8c2f6eaad7b9387073c0.tar.gz hands-on-scala-js-0489a0d6c8d3beceeedb8c2f6eaad7b9387073c0.tar.bz2 hands-on-scala-js-0489a0d6c8d3beceeedb8c2f6eaad7b9387073c0.zip |
one-button build
Diffstat (limited to 'book/src/main/scalatex/book/indepth/JavaAPIs.scalatex')
-rw-r--r-- | book/src/main/scalatex/book/indepth/JavaAPIs.scalatex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex b/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex index 9b526a4..685fdfd 100644 --- a/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex +++ b/book/src/main/scalatex/book/indepth/JavaAPIs.scalatex @@ -1,3 +1,5 @@ +@import BookData._ + @p Below is a list of classes from the Java Standard Library that are available from Scala.js. In general, much of @hl.scala{java.lang}, and parts of @hl.scala{java.io}, @hl.scala{java.util} and @hl.scala{java.net} have been ported over. This means that all these classes are available for use in Scala.js applications despite being part of the Java standard library. @p @@ -37,7 +39,7 @@ @p And other similar APIs will either need to be rewritten to not-use them. For example, @hl.scala{AtomicXXXs} can be written without threading/unsafe APIs because Javascript is single-threaded, making the implementation for e.g. an @hl.scala{AtomicBoolean} pretty trivial: - @hl.ref("examples/scala-js/javalib/src/main/scala/java/util/concurrent/atomic/AtomicBoolean.scala") + @hl.ref(cloneRoot + "/scala-js/javalib/src/main/scala/java/util/concurrent/atomic/AtomicBoolean.scala") @p Others can't be ported at all (e.g. @code{java.io.File}) simply because the API capabilities they provide (blocking reads & writes to files) do not exist in the Javascript runtime. |