Added in API level 1

Compiler

class Compiler
kotlin.Any
   ↳ java.lang.Compiler

Does nothing on Android.

Summary

Public methods
static Any!
command(cmd: Any!)

Executes an operation according to the specified command object.

static Boolean
compileClass(classToCompile: Class<*>!)

Compiles the specified class using the JIT compiler and indicates if compilation has been successful.

static Boolean
compileClasses(nameRoot: String!)

Compiles all classes whose name matches the specified name using the JIT compiler and indicates if compilation has been successful.

static Unit

Disables the JIT compiler.

static Unit

Enables the JIT compiler.

Public methods

command

Added in API level 1
static fun command(cmd: Any!): Any!

Executes an operation according to the specified command object. This method is the low-level interface to the JIT compiler. It may return any object or null if no JIT compiler is available. Returns null on Android, whether or not the system has a JIT.

Parameters
cmd Any!: the command object for the JIT compiler.
Return
Any! the result of executing command or null.

compileClass

Added in API level 1
static fun compileClass(classToCompile: Class<*>!): Boolean

Compiles the specified class using the JIT compiler and indicates if compilation has been successful. Does nothing and returns false on Android.

Parameters
classToCompile Class<*>!: java.lang.Class the class to JIT compile
Return
Boolean true if the compilation has been successful; false if it has failed or if there is no JIT compiler available.

compileClasses

Added in API level 1
static fun compileClasses(nameRoot: String!): Boolean

Compiles all classes whose name matches the specified name using the JIT compiler and indicates if compilation has been successful. Does nothing and returns false on Android.

Parameters
nameRoot String!: the string to match class names with.
Return
Boolean true if the compilation has been successful; false if it has failed or if there is no JIT compiler available.

disable

Added in API level 1
static fun disable(): Unit

Disables the JIT compiler. Does nothing on Android.

enable

Added in API level 1
static fun enable(): Unit

Enables the JIT compiler. Does nothing on Android.