Skip to content

Instantly share code, notes, and snippets.

@halfninja
Created February 13, 2012 14:47
Show Gist options
  • Save halfninja/1817379 to your computer and use it in GitHub Desktop.
Save halfninja/1817379 to your computer and use it in GitHub Desktop.
Simple way of exposing a bunch of type aliases in your Scala application
// extend your class with JavaImports to expose these types
trait JavaImports {
type JBoolean = java.lang.Boolean
type JList[V] = java.util.List[V]
type JMap[K,V] = java.util.Map[K,V]
type JSet[V] = java.util.Set[V]
// Add more types as desired
}
// or import JavaImports._
object JavaImports extends JavaImports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment