Skip to content

JRE Emulation Reference

Tom Ball edited this page Feb 6, 2014 · 5 revisions

J2ObjC includes a library that emulates a subset of the Java runtime library (lib/libjre_emul.a). The list below shows the set of JRE packages, types and methods that J2ObjC can translate automatically. Note that in some cases, only a subset of methods is supported for a given type; if so, the supported methods are listed below the class name.

NOTE: the JRE emulation support is rapidly evolving, so this page may lag behind the actual release contents. To find the exact list of classes and methods, check the J2ObjC distribution's include directory. Each supported class will have a matching header (.h) file, which lists all supported methods.

java.beans

IndexedPropertyChangeEvent PropertyChangeEvent PropertyChangeListener PropertyChangeListenerProxy
PropertyChangeSupport

java.io

BufferedInputStream BufferedOutputStream BufferedReader BufferedWriter
ByteArrayInputStream ByteArrayOutputStream CharArrayReader CharArrayWriter
CharConversionException Closeable DataInput DataInputStream
DataOutput DataOutputStream EOFException Externalizable
File FileDescriptor FileFilter FileInputStream
FileNotFoundException FileOutputStream FileReader FileWriter
FilenameFilter FilterInputStream FilterOutputStream FilterReader
FilterWriter Flushable IOException InputStream
InputStreamReader InterruptedIOException InvalidClassException InvalidObjectException
LineNumberReader NotActiveException NotSerializeableException ObjectInput
ObjectInputStream ObjectInputValidation ObjectOutput ObjectOutputStream
ObjectStreamClass ObjectStreamConstants ObjectStreamException ObjectStreamField
OptionalDataException OutputStream OutputStreamWriter PipedInputStream
PipedOutputStream PipedReader PipedWriter PrintStream
PrintWriter PushbackInputStream PushbackReader RandomAccessFile
Reader SequenceInputStream Serializable SerializablePermission
StreamCorruptedException StreamTokenizer StringReader StringWriter
SyncFailedException UTFDataFormatException UnsupportedEncodingException WriteAbortedException
Writer

java.lang

Void
AbstractMethodError Appendable ArithmeticException ArrayIndexOutOfBoundsException
ArrayStoreException AssertionError AutoCloseable Boolean
Byte CharSequence Character Class
ClassCastException ClassFormatError ClassLoader ClassNotFoundException
CloneNotSupportedException Comparable Deprecated Double
Enum Error Exception ExceptionInInitializerError
Float IllegalAccessException IllegalArgumentException IllegalMonitorState
IllegalStateException IllegalThreadStateException IncompatibleClassChangeError IndexOutOfBoundsException
InstantiationException Integer InternalError InterruptedException
Iterable LinkageError Long Math
NegativeArraySizeException NoSuchFieldError NoSuchFieldException NoSuchMethodError
NoSuchMethodException NullPointerException Number NumberFormatException
Object Override Package Readable
Runnable RuntimeException SafeArgs SecurityException
SecurityManager Short StackTraceElement StrictMath
String StringBuffer StringBuilder StringIndexOutOfBoundsException
SuppressWarnings System Thread ThreadDeath
ThreadGroup ThreadLocal Throwable TypeNotPresentException
UnsupportedOperationException VirtualMachineError
  • System:
  • Supported methods: currentTimeMillis(), identityHashCode(), arrancopy(), nanoTime(), exit()
  • System properties: only os.name, file.separator, line.separator, path.separator (plus any defined using System.setProperty())
  • Object, Number, and String are supported but do not have header (.h) files, because these classes are translated directly to their respective Foundation classes (NSObject, NSNumber, and NSString). Class is supported by J2ObjC's IOSClass.

java.lang.annotation

Annotation AnnotationFormatError AnnotationTypeMismatchException Documented
ElementType IncompleteAnnotationException Inherited Retention
RetentionPolicy Target

java.lang.ref

PhantomReference Reference ReferenceQueue SoftReference
WeakReference

java.lang.reflect

AccessibleObject AnnotatedElement Array Constructor
ExecutableMember Field GenericArrayType GenericDeclaration
GenericSignatureFormatError InvocationHandler InvocationTargetException MalformedParameterizedTypeException
Member Method Modifier ParameterizedType
Proxy ReflectPermission Type TypeVariable
UndeclaredThrowableException WildcardType

java.math

BigDecimal BigInteger BitLevel Conversion
Division Elementary Logical MathContext
Multiplication Primality RoundingMode

java.nio

Buffer BufferFactory BufferOverflowException BufferUnderflowException
ByteBuffer ByteOrder CharArrayBuffer CharBuffer
CharSequenceAdapter DoubleArrayBuffer DoubleBuffer FloatArrayBuffer
FloatBuffer HeapByteBuffer IntArrayBuffer IntBuffer
InvalidMarkException LongArrayBuffer LongBuffer ReadOnlyBufferException
ReadOnlyCharArrayBuffer ReadOnlyDoubleArrayBuffer ReadOnlyFloatArrayBuffer ReadOnlyHeapByteBuffer
ReadOnlyIntArrayBuffer ReadOnlyLongArrayBuffer ReadOnlyShortArrayBuffer ReadWriteCharArrayBuffer
ReadWriteDoubleArrayBuffer ReadWriteFloatArrayBuffer ReadWriteHeapByteBuffer ReadWriteIntArrayBuffer
ReadWriteLongArrayBuffer ReadWriteShortArrayBuffer ShortArrayBuffer ShortBuffer

java.nio.charset

CharsetCodingException Charset CharsetDecoder CharsetEncoder
Charsets CoderMalfunctionError CoderResult CodingErrorAction
IllegalCharsetNameException MalformedInputException StandardCharsets UnmappableCharacterException
UnsupportedCharsetException

java.text

Annotation AttributedCharacterIterator AttributedString CharacterIterator
ChoiceFormat CollationKey Collator DateFormat
DateFormatSymbols DecimalFormat DecimalFormatSymbols FieldPosition
Format MessageFormat NumberFormat ParseException
ParsePosition SimpleDateFormat

java.util

AbstractCollection AbstractList AbstractMap AbstractQueue
AbstractSequentialList AbstractSet ArrayDeque ArrayList
Arrays BitSet Calendar Collection
Collections Comparator ConcurrentModificationException Currency
Date Deque Dictionary DuplicateFormatFlagsException
EventListener EmptyStackException EnumMap EnumSet
Enumeration EventListener EventListenerProxy EventObject
GregorianCalendar HashMap HashSet Hashtable
IdentityHashMap IllegalFormatCodePointException IllegalFormatConversionException IllegalFormatException
IllegalFormatFlagsException IllegalFormatPrecisionException IllegalFormatWidthException InputMismatchException
InputMismatchException InvalidPropertiesFormatException Iterator LinkedHashMap
LinkedHashSet LinkedList List ListIterator
ListResourceBundle Locale Map MissingFormatArgumentException
MissingFormatWidthException MissingResourceException NavigableMap NavigableSet
NoSuchElementException Observable Observer PriorityQueue
Properties PropertyResourceBundle Queue Random
RandomAccess ResourceBundle ServiceConfigurationError ServiceLoader
Set SimpleTimeZone SortedMap SortedSet
Stack TimeZone Timer TimerTask
TreeMap TreeSet UUID UnknownFormatConversionException
UnknownFormatFlagsException Vector WeakHashMap

java.util.concurrent

AbstractExecutorService ArrayBlockingQueue BlockingDeque BlockingQueue
BrokenBarrierException Callable CancellationException CompletionService
ConcurrentHashMap ConcurrentLinkedDeque ConcurrentLinkedQueue ConcurrentMap
ConcurrentNavigableMap ConcurrentSkipListMap ConcurrentSkipListSet CopyOnWriteArrayList
CopyOnWriteArraySet CountDownLatch CyclicBarrier DelayQueue
Delayed Exchanger ExecutionException Executor
ExecutorCompletionService ExecutorService Executors ForkJoinPool
ForkJoinTask ForkJoinWorkerThread Future FutureTask
LinkedBlockingDeque LinkedBlockingQueue LinkedTransferQueue Phaser
PriorityBlockingQueue RecursiveAction RecursiveTask RejectedExecutionException
RejectedExecutionHandler RunnableFuture RunnableScheduledFuture ScheduledExecutorService
ScheduledFuture ScheduledThreadPoolExecutor Semaphore SynchronousQueue
ThreadFactory ThreadLocalRandom ThreadPoolExecutor TimeUnit
TimeoutException TransferQueue

java.util.concurrent.atomic

AtomicBoolean AtomicInteger AtomicIntegerArray AtomicLong
AtomicLongArray AtomicLongFieldUpdater AtomicMarkableReference AtomicReference
AtomicReferenceArray AtomicReferenceFieldUpdater AtomicStampedReference Fences

java.util.concurrent.locks

AbstractOwnableSynchronizer AbstractQueuedLongSynchronizer AbstractQueuedSynchronizer Condition
Lock LockSupport ReadWriteLock ReentrantLock
ReentrantReadWriteLock

java.util.logging

ConsoleHandler ErrorManager Filter Formatter
Handler Level LogManager LogRecord
Logger LoggingMXBean LoggingPermission MemoryHandler
SimpleFormatter StreamHandler XMLFormatter

java.util.regex

MatchResult Matcher Pattern PatternSyntaxException
Splitter

javax.xml

XMLConstants

javax.xml.parsers

FactoryConfigurationError FilePathToURI ParserConfigurationException SAXParser
SAXParserFactory

javax.xml.transform

Result Source

javax.xml.validation

Schema TypeInfoProvider Validator ValidatorHandler

org.w3c.dom

TypeInfo

org.w3c.dom.ls

LSInput LSResourceResolver

org.xml.sax

AttributeList Attributes ContentHandler DocumentHandler
DTDHandler EntityResolver ErrorHandler HandlerBase
InputSource Locator Parser SAXException
SAXNotRecognizedException SAXNotSupportedException SAXParseException XMLFilter
XMLReader

org.xml.sax.ext

Attributes2 Attributes2Impl DeclHandler DefaultHandler2
EntityResolver2 LexicalHandler Locator2 Locator2Impl

org.xml.sax.helpers

AttributeListImpl AttributesImpl DefaultHandler LocatorImpl
NamespaceSupport ParserAdapter ParserFactory XMLFilterImpl
XMLReaderAdapter XMLReaderFactory

We've Moved!

The J2ObjC wiki has moved to j2objc.org.

Clone this wiki locally