Skip to content

clojure.core/definterface

View this page on ClojureDocs

Type: macro Added: Clojure 1.2 Examples: 2 Runnable: 0
([name & sigs])

Creates a new Java interface with the given name and method sigs. The method return types and parameter types may be specified with type hints, defaulting to Object if omitted.

(definterface MyInterface (^int method1 [x]) (^Bar method2 [^Baz b ^Quux q]))

Examples

by jafingerhut on . May have evaluation errors.
by mars0i on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.