Java Standard Library

Scala Native supports a subset of the JDK core libraries reimplemented in Scala.

Here is the list of currently available classes:

  • java.io.BufferedReader
  • java.io.ByteArrayInputStream
  • java.io.ByteArrayOutputStream
  • java.io.Closeable
  • java.io.DataInput
  • java.io.EOFException
  • java.io.FilterInputStream
  • java.io.FilterOutputStream
  • java.io.Flushable
  • java.io.IOException
  • java.io.InputStream
  • java.io.InputStreamReader
  • java.io.NotSerializableException
  • java.io.ObjectStreamException
  • java.io.OutputStream
  • java.io.OutputStreamWriter
  • java.io.PrintStream
  • java.io.PrintWriter
  • java.io.Reader
  • java.io.Serializable
  • java.io.StringReader
  • java.io.StringWriter
  • java.io.UTFDataFormatException
  • java.io.UnsupportedEncodingException
  • java.io.Writer
  • java.lang.AbstractMethodError
  • java.lang.AbstractStringBuilder
  • java.lang.Appendable
  • java.lang.ArithmeticException
  • java.lang.ArrayIndexOutOfBoundsException
  • java.lang.ArrayStoreException
  • java.lang.AssertionError
  • java.lang.AutoCloseable
  • java.lang.Boolean
  • java.lang.BootstrapMethodError
  • java.lang.Byte
  • java.lang.CharSequence
  • java.lang.Character
  • java.lang.Character$CaseFolding
  • java.lang.ClassCastException
  • java.lang.ClassCircularityError
  • java.lang.ClassFormatError
  • java.lang.ClassNotFoundException
  • java.lang.CloneNotSupportedException
  • java.lang.Cloneable
  • java.lang.Comparable
  • java.lang.Double
  • java.lang.Enum
  • java.lang.EnumConstantNotPresentException
  • java.lang.Error
  • java.lang.Exception
  • java.lang.ExceptionInInitializerError
  • java.lang.Float
  • java.lang.IllegalAccessError
  • java.lang.IllegalAccessException
  • java.lang.IllegalArgumentException
  • java.lang.IllegalMonitorStateException
  • java.lang.IllegalStateException
  • java.lang.IllegalThreadStateException
  • java.lang.IncompatibleClassChangeError
  • java.lang.IndexOutOfBoundsException
  • java.lang.InheritableThreadLocal
  • java.lang.InstantiationError
  • java.lang.InstantiationException
  • java.lang.Integer
  • java.lang.InternalError
  • java.lang.InterruptedException
  • java.lang.Iterable
  • java.lang.LinkageError
  • java.lang.Long
  • java.lang.Math
  • java.lang.NegativeArraySizeException
  • java.lang.NoClassDefFoundError
  • java.lang.NoSuchFieldError
  • java.lang.NoSuchFieldException
  • java.lang.NoSuchMethodError
  • java.lang.NoSuchMethodException
  • java.lang.NullPointerException
  • java.lang.Number
  • java.lang.NumberFormatException
  • java.lang.OutOfMemoryError
  • java.lang.Readable
  • java.lang.ReflectiveOperationException
  • java.lang.RejectedExecutionException
  • java.lang.Runnable
  • java.lang.Runtime
  • java.lang.RuntimeException
  • java.lang.SecurityException
  • java.lang.Short
  • java.lang.StackOverflowError
  • java.lang.StackTraceElement
  • java.lang.String
  • java.lang.StringBuffer
  • java.lang.StringBuilder
  • java.lang.StringIndexOutOfBoundsException
  • java.lang.System
  • java.lang.Thread
  • java.lang.Thread$UncaughtExceptionHandler
  • java.lang.ThreadDeath
  • java.lang.ThreadLocal
  • java.lang.Throwable
  • java.lang.TypeNotPresentException
  • java.lang.UnknownError
  • java.lang.UnsatisfiedLinkError
  • java.lang.UnsupportedClassVersionError
  • java.lang.UnsupportedOperationException
  • java.lang.VerifyError
  • java.lang.VirtualMachineError
  • java.lang.Void
  • java.lang._String$CaseInsensitiveComparator
  • java.lang.ref.PhantomReference
  • java.lang.ref.Reference
  • java.lang.ref.ReferenceQueue
  • java.lang.ref.SoftReference
  • java.lang.ref.WeakReference
  • java.lang.reflect.Array
  • java.math.BigDecimal
  • java.math.BigDecimal$QuotAndRem
  • java.math.BigDecimal$StringOps
  • java.math.BigInteger
  • java.math.BigInteger$QuotAndRem
  • java.math.BitLevel
  • java.math.Conversion
  • java.math.Division
  • java.math.Elementary
  • java.math.Logical
  • java.math.MathContext
  • java.math.Multiplication
  • java.math.Primality
  • java.math.RoundingMode
  • java.nio.Buffer
  • java.nio.BufferOverflowException
  • java.nio.BufferUnderflowException
  • java.nio.ByteBuffer
  • java.nio.CharBuffer
  • java.nio.GenBuffer
  • java.nio.GenHeapBuffer
  • java.nio.GenHeapBuffer$NewHeapBuffer
  • java.nio.HeapByteBuffer
  • java.nio.HeapByteBuffer$NewHeapByteBuffer
  • java.nio.HeapCharBuffer
  • java.nio.HeapCharBuffer$NewHeapCharBuffer
  • java.nio.ReadOnlyBufferException
  • java.nio.StringCharBuffer
  • java.nio.charset.CharacterCodingException
  • java.nio.charset.Charset
  • java.nio.charset.CharsetDecoder
  • java.nio.charset.CharsetEncoder
  • java.nio.charset.CoderMalfunctionError
  • java.nio.charset.CoderResult
  • java.nio.charset.CodingErrorAction
  • java.nio.charset.MalformedInputException
  • java.nio.charset.StandardCharsets
  • java.nio.charset.UnmappableCharacterException
  • java.nio.charset.UnsupportedCharsetException
  • java.security.AccessControlException
  • java.util.AbstractCollection
  • java.util.AbstractList
  • java.util.AbstractListView
  • java.util.AbstractMap
  • java.util.AbstractMap$SimpleEntry
  • java.util.AbstractMap$SimpleImmutableEntry
  • java.util.AbstractQueue
  • java.util.AbstractRandomAccessListIterator
  • java.util.AbstractSequentialList
  • java.util.AbstractSet
  • java.util.Arrays
  • java.util.Arrays$AsRef
  • java.util.BackedUpListIterator
  • java.util.Collection
  • java.util.Collections
  • java.util.Collections$BasicSynchronizedList$1
  • java.util.Collections$CheckedCollection
  • java.util.Collections$CheckedList
  • java.util.Collections$CheckedListIterator
  • java.util.Collections$CheckedMap
  • java.util.Collections$CheckedSet
  • java.util.Collections$CheckedSortedMap
  • java.util.Collections$CheckedSortedSet
  • java.util.Collections$EmptyIterator
  • java.util.Collections$EmptyListIterator
  • java.util.Collections$ImmutableList
  • java.util.Collections$ImmutableMap
  • java.util.Collections$ImmutableSet
  • java.util.Collections$UnmodifiableCollection
  • java.util.Collections$UnmodifiableIterator
  • java.util.Collections$UnmodifiableList
  • java.util.Collections$UnmodifiableListIterator
  • java.util.Collections$UnmodifiableMap
  • java.util.Collections$UnmodifiableSet
  • java.util.Collections$UnmodifiableSortedMap
  • java.util.Collections$UnmodifiableSortedSet
  • java.util.Collections$WrappedCollection
  • java.util.Collections$WrappedCollection$class
  • java.util.Collections$WrappedEquals
  • java.util.Collections$WrappedEquals$class
  • java.util.Collections$WrappedIterator
  • java.util.Collections$WrappedIterator$class
  • java.util.Collections$WrappedList
  • java.util.Collections$WrappedList$class
  • java.util.Collections$WrappedListIterator
  • java.util.Collections$WrappedListIterator$class
  • java.util.Collections$WrappedMap
  • java.util.Collections$WrappedMap$class
  • java.util.Collections$WrappedSet
  • java.util.Collections$WrappedSortedMap
  • java.util.Collections$WrappedSortedMap$class
  • java.util.Collections$WrappedSortedSet
  • java.util.Collections$WrappedSortedSet$class
  • java.util.Comparator
  • java.util.Comparator$class
  • java.util.ConcurrentModificationException
  • java.util.Deque
  • java.util.Dictionary
  • java.util.DuplicateFormatFlagsException
  • java.util.EmptyStackException
  • java.util.Enumeration
  • java.util.FormatFlagsConversionMismatchException
  • java.util.Formattable
  • java.util.FormattableFlags
  • java.util.Formatter
  • java.util.FormatterClosedException
  • java.util.HashMap
  • java.util.HashMap$AbstractMapView
  • java.util.HashMap$AbstractMapView$class
  • java.util.HashMap$AbstractMapViewIterator
  • java.util.HashMap$EntrySet
  • java.util.HashMap$KeySet
  • java.util.HashMap$ValuesView
  • java.util.HashSet
  • java.util.Hashtable
  • java.util.Hashtable$UnboxedEntry$1
  • java.util.IllegalFormatCodePointException
  • java.util.IllegalFormatConversionException
  • java.util.IllegalFormatException
  • java.util.IllegalFormatFlagsException
  • java.util.IllegalFormatPrecisionException
  • java.util.IllegalFormatWidthException
  • java.util.IllformedLocaleException
  • java.util.InputMismatchException
  • java.util.InvalidPropertiesFormatException
  • java.util.Iterator
  • java.util.LinkedHashMap
  • java.util.LinkedHashSet
  • java.util.LinkedList
  • java.util.LinkedList$Node
  • java.util.List
  • java.util.ListIterator
  • java.util.Locale
  • java.util.Map
  • java.util.Map$Entry
  • java.util.MissingFormatArgumentException
  • java.util.MissingFormatWidthException
  • java.util.MissingResourceException
  • java.util.NavigableSet
  • java.util.NavigableView
  • java.util.NoSuchElementException
  • java.util.Objects
  • java.util.PriorityQueue
  • java.util.PriorityQueue$BoxOrdering
  • java.util.Properties
  • java.util.Queue
  • java.util.Random
  • java.util.RandomAccess
  • java.util.RandomAccessListIterator
  • java.util.ServiceConfigurationError
  • java.util.Set
  • java.util.SizeChangeEvent
  • java.util.SizeChangeEvent$class
  • java.util.SortedMap
  • java.util.SortedSet
  • java.util.TooManyListenersException
  • java.util.TreeSet
  • java.util.TreeSet$BoxOrdering
  • java.util.UUID
  • java.util.UnknownFormatConversionException
  • java.util.UnknownFormatFlagsException
  • java.util.concurrent.Callable
  • java.util.concurrent.TimeUnit
  • java.util.concurrent.atomic.AtomicBoolean
  • java.util.concurrent.atomic.AtomicInteger
  • java.util.concurrent.atomic.AtomicLong
  • java.util.concurrent.atomic.AtomicLongArray
  • java.util.concurrent.atomic.AtomicReference
  • java.util.concurrent.atomic.AtomicReferenceArray
  • java.util.package
  • java.util.package$Box
  • java.util.package$CompareNullablesOps

Note: This is an ongoing effort, some of the classes listed here might be partially implemented. Please consult javalib sources for details.

java.util.regex

Scala Native implements java.util.regex with Google’s RE2 library. There is some differences with the original API:

Some expressions are not supported:
  • Character Classes * unions: [a-d[m-p]] * intersections: [a-z&&[^aeiou]]
  • predefined character classes: h, H, v, V
  • java character function classes * p{javaLowerCase} * p{javaUpperCase} * p{javaWhitespace} * p{javaMirrored}
  • boundary matchers: G, Z, R
  • possessive quantifiers * X?+ * X*+ * X++ * X{n}+ * X{n,}+ * X{n,m}+
  • lookaheads * (?=X) * (?!X) * (?<=X) * (?<!X) * (?>X)

Some expressions have an alternative syntax:

Continue to C Standard Library.