Skip to main content

Host Interop

  • 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...

  • 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 ...

  • 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.

  • boolean-array

    Creates an array of booleans

  • booleans

    Casts to boolean[]

  • byte-array

    Creates an array of bytes

  • bytes

    Casts to bytes[]

  • bytes

    Generates byte-arrays.

  • 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.

  • set!

    Establish thread local binding of dynamic var

  • 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...

  • bean

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

  • 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-url

    Searches for a URL for the given class name. Tries *local-javadocs* first, then *remote-javadocs*. Returns a string.

  • .

    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...