package com.example;
public class Encrypter {
public enum KeyPlacement {
PEER,
INLINE
}
private KeyPlacement keyPlacement;
public KeyPlacement getKeyPlacement() {
return this.keyPlacement;
}
public void setKeyPlacement(final KeyPlacement newKeyPlacement) {
this.keyPlacement = newKeyPlacement;
}
}
Setting
keyPlacement
value from Clojure can be done as follows.(ns core
(:import [com.example Encrypter Encrypter$KeyPlacement]))
(doto (Encrypter.)
(.setKeyPlacement Encrypter$KeyPlacement/INLINE))
When compiling the above source, inner classes, enums etc. gets generated with
$
appended as Encrypter$KeyPlacement
. So we can import those and access them from Clojure.