How does one go about importing a Java class located inside another Java class from Clojure?
The class I am attempting to import is the Pixmap.Format located in the LibGDX library. As play-clj handles the integration with LibGDX for Clojure, there is no problem whatsoever actually importing classes from LibGDX itself. The problem lies in importing the Format class located inside the Pixmap class.
I have tried a couple of different things:
; This I have tried
(:import com.badlogic.gdx.graphics Pixmap.Format))
; And this
(:import com.badlogic.gdx.graphics Pixmap/Format))
The separator you're looking for is
$, so you can import the nested class like this:
Or like this:
(import (com.badlogic.gdx.graphics Pixmap$Format))
Then you can access static fields of
Pixmap$Format like this: