score:3
Accepted answer
there are two different issues: compile-time and run-time sandboxing.
runtime sandboxing can be accomplished by using java security and classloader restrictions - see e.g. how do i create a java sandbox? and, more cautionary, can i trust java securitymanager sandbox?. there's a lot more out there on this topic!
for scala compile-time sandboxing, i have to defer. however, i wonder whether you need it. if the only people who try to use forbidden api's are those who are trying to break into your system, there's no reason to make their job easier by providing compile-time checking.
Source: stackoverflow.com
Related Query
- Prevent imports of unauthorized classes in Scala
- How to prevent Intellij Scala compiler from marking unused imports as errors?
- Match multiple cases classes in scala
- How to prevent java.lang.OutOfMemoryError: PermGen space at Scala compilation?
- Scala type keyword: how best to use it across multiple classes
- What are type classes in Scala useful for?
- hashCode in case classes in Scala
- Scala - how to print case classes like (pretty printed) tree
- Scala import not working - object <name> is not a member of package, sbt preppends current package namespace in imports
- Why are classes inside Scala package objects dispreferred?
- 22 fields limit in Scala 2.11 + Play Framework 2.3 Case classes and functions
- Static inner classes in scala
- Case Classes with optional fields in Scala
- Intellij scala worksheet can't find project classes
- Constructing simple Scala case classes from Strings, strictly without boiler-plate
- How can I match classes in a Scala "match" statement?
- Does Scala have static imports like Java?
- Using generic case classes in Scala
- Fastest serialization/deserialization of Scala case classes
- Why does Scala have classes when it already has traits?
- Scala case classes with Mixin traits
- Does the incremental compilation speed in Scala depend on the number of classes per file?
- how to auto-reload changed scala classes into SBT REPL
- Matching (and binding) two exception classes in one case statement in Scala 2.7?
- Accessing Scala nested classes from Java
- How to get Scala imports working in IntelliJ IDEA with the Play framework?
- How to use Scala 2.10 implicit classes
- Type classes in Scala
- Do abstract classes in Scala really perform better than traits?
- How to use scala reflection API to get all contained classes
More Query from same tag
- Get the return value of reactivemongo findAndUpdate function
- Transposing a part of the rdd row
- Why does Scala 2.9.1 not realize NodeSeq is also GenTraversableOnce
- Save values in spark
- sbt task to increment project version
- Why should we avoid public methods? Benefits of encapsulation
- String splitting in Scala without discarding trailing empty strings
- get ServerStatus using Scala/Play Framework
- Design pattern for converting data to one of multiple types [Scala]
- Scala: map(f) and map(_.f)
- ScalikeJDBC won't connect to NamedDB for DSL queries in ScalaTest test cases
- scala how to convert future of one type to future of another type
- Is it possible to register a string as a UDF?
- Composing Future List Akka Scala
- Why does Scala create a ~/tmp directory when I run a script?
- Compile a class or function into Javascript
- Using Scala continuations for non-blocking APIs
- How to implement Play2 API server returning File via Ajax?
- Scala: Auto detection of delimiter/separator in CSV file
- Using .join in Scala to remove unnecessary lines from one database
- Read HBase table with where clause using Spark
- any more efficient methods to get the columns different from each other?
- accessing elements of a lift-json parsed object in scala
- How to get javadoc when using sbt and Eclipse?
- Offset Management For Apache Kafka With Apache Spark Batch
- Check if Day is Saturday or Sunday
- Passing functions and operating on their results within Scala's Actors
- Scala chat application, blocking issue
- Difference between function with parentheses and without
- Router Hanging in Dealer-Router Setup