Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Transform java public fields to clojure maps
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/nl/zeekat/java
test/nl/zeekat/java/fields
.gitignore
README
project.clj

README

# nl.zeekat.java.fields

Convert public fields to clojure maps

## Usage

(ns your.namespace
 (:use nl.zeekat.java.fields))

(deftype TestType
    [field1 field2])

; fully dynamic:

(fields (TestType. 1 2)) 
=> {:field1 1 :field2 2}
  
; optimized for specific class:
(def-fields rec-map TestType)

(rec-map (TestType. 1 2)) 
=> {:field1 1 :field2 2}

Field names are translated to lisp-style

## License

Copyright (C) 2011 Joost Diepenmaat, Zeekat Softwareontwikkeling

joost@zeekat.nl

Distributed under the Eclipse Public License, the same as Clojure.
Something went wrong with that request. Please try again.