Skip to main content

Host Interop

  • definterface

    Creates a new Java interface with the given name and method sigs. The method return types and parameter types may be s...

  • defrecord

    (defrecord name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order)...

  • deftype

    (deftype name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order). ...

  • extend

    Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:fo...

  • extend-protocol

    Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and ...

  • extend-type

    A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type...

  • gen-class

    When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in...

  • gen-interface

    When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all nam...

  • proxy

    class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass cons...

  • proxy-super

    Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this

  • reify

    reify creates an object implementing a protocol or interface. reify is a macro with the following structure: (reify ...

  • classpath

    Returns a sequence of File objects of the elements on the classpath. Defaults to searching for instances of java.net...

  • classpath-directories

    Returns a sequence of File objects for the directories on classpath.

  • classpath-jarfiles

    Returns a sequence of JarFile objects for the JAR files on classpath.

  • filenames-in-jar

    Returns a sequence of Strings naming the non-directory entries in the JAR file.

  • get-urls

    Returns a sequence of java.net.URL objects used by this classloader, or nil if the classloader does not sastify the ...

  • jar-file?

    Returns true if file is a normal file with a .jar or .JAR extension.

  • loader-classpath

    Returns a sequence of File paths from a classloader.

  • system-classpath

    Returns a sequence of File paths from the 'java.class.path' system property.

  • urls

    Returns a sequence of java.net.URL objects representing locations which this classloader will search for classes and r...

  • aclone

    Returns a clone of the Java array. Works on arrays of known types.

  • aget

    Returns the value at the index/indices. Works on Java arrays of all types.

  • alength

    Returns the length of the Java array. Works on arrays of all types.

  • amap

    Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of ...

  • areduce

    Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, se...

  • aset

    Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.

  • aset-boolean

    Sets the value at the index/indices. Works on arrays of boolean. Returns val.

  • aset-byte

    Sets the value at the index/indices. Works on arrays of byte. Returns val.

  • aset-char

    Sets the value at the index/indices. Works on arrays of char. Returns val.

  • aset-double

    Sets the value at the index/indices. Works on arrays of double. Returns val.

  • aset-float

    Sets the value at the index/indices. Works on arrays of float. Returns val.

  • aset-int

    Sets the value at the index/indices. Works on arrays of int. Returns val.

  • aset-long

    Sets the value at the index/indices. Works on arrays of long. Returns val.

  • aset-short

    Sets the value at the index/indices. Works on arrays of short. Returns val.

  • boolean-array

    Creates an array of booleans

  • booleans

    Casts to boolean[]

  • byte-array

    Creates an array of bytes

  • bytes

    Casts to bytes[]

  • char-array

    Creates an array of chars

  • chars

    Casts to chars[]

  • double-array

    Creates an array of doubles

  • doubles

    Casts to double[]

  • float-array

    Creates an array of floats

  • floats

    Casts to float[]

  • int-array

    Creates an array of ints

  • into-array

    Returns an array with components set to the values in aseq. The array's component type is type if provided, or the typ...

  • ints

    Casts to int[]

  • long-array

    Creates an array of longs

  • longs

    Casts to long[]

  • make-array

    Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class obj...

  • object-array

    Creates an array of objects

  • set!

    Assigns a new value to a var or field.

  • short-array

    Creates an array of shorts

  • shorts

    Casts to shorts[]

  • to-array

    Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collectio...

  • to-array-2d

    Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collec...

  • add-local-javadoc

    Adds to the list of local Javadoc paths.

  • add-remote-javadoc

    Adds to the list of remote Javadoc URLs. package-prefix is the beginning of the package name that has docs at this UR...

  • bean

    Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.

  • browse-url

    Open url in a browser

  • cast

    Throws a ClassCastException if x is not a c, else returns x.

  • enumeration-seq

    Returns a seq on a java.util.Enumeration

  • iterator-seq

    Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus supp...

  • javadoc

    Opens a browser window displaying the javadoc for the argument. Tries *local-javadocs* first, then *remote-javadocs*.

  • .

    Host interop: field access or method call.

  • bean

    Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.

  • memfn

    Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance meth...