Skip to content

Instantly share code, notes, and snippets.

View jolby's full-sized avatar

Joel Boehland jolby

View GitHub Profile
@jolby
jolby / java_interop.clj
Created May 23, 2019 17:25 — forked from kylewlacy/java_interop.clj
Small DSL for making Java classes in Clojure, using ASM
; Based on https://gist.github.com/athos/1033052
(ns cljl.java-interop
(:require [clojure.string :as str])
(:import (clojure.asm Opcodes Type ClassWriter)
(clojure.asm.commons Method GeneratorAdapter)))
(def ^:dynamic *version* Opcodes/V1_6)
(def modifier->opcode