Add reflection info to support clj-http-lite
This commit is contained in:
parent
fc20ed00a3
commit
34249ad0b1
5 changed files with 164 additions and 1 deletions
118
reflection.json
118
reflection.json
|
|
@ -18,11 +18,26 @@
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
"allPublicFields" : true,
|
"allPublicFields" : true,
|
||||||
"allPublicConstructors" : true
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.io.ByteArrayInputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.io.ByteArrayOutputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
}, {
|
}, {
|
||||||
"name" : "java.io.File",
|
"name" : "java.io.File",
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
"allPublicFields" : true,
|
"allPublicFields" : true,
|
||||||
"allPublicConstructors" : true
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.io.IOException",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
}, {
|
}, {
|
||||||
"name" : "java.io.InputStream",
|
"name" : "java.io.InputStream",
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
|
|
@ -118,6 +133,31 @@
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
"allPublicFields" : true,
|
"allPublicFields" : true,
|
||||||
"allPublicConstructors" : true
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.net.HttpURLConnection",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.net.URI",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.net.URLDecoder",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.net.URLEncoder",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.net.UnknownHostException",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
}, {
|
}, {
|
||||||
"name" : "java.nio.file.CopyOption",
|
"name" : "java.nio.file.CopyOption",
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
|
|
@ -288,6 +328,41 @@
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
"allPublicFields" : true,
|
"allPublicFields" : true,
|
||||||
"allPublicConstructors" : true
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.util.zip.DeflaterInputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.util.zip.GZIPInputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.util.zip.GZIPOutputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "java.util.zip.InflaterInputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "javax.xml.bind.DatatypeConverter",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "sun.net.www.protocol.http.HttpURLConnection",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
|
}, {
|
||||||
|
"name" : "sun.net.www.protocol.http.HttpURLConnection$HttpInputStream",
|
||||||
|
"allPublicMethods" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"allPublicConstructors" : true
|
||||||
}, {
|
}, {
|
||||||
"name" : "sun.nio.fs.UnixPath",
|
"name" : "sun.nio.fs.UnixPath",
|
||||||
"allPublicMethods" : true,
|
"allPublicMethods" : true,
|
||||||
|
|
@ -363,4 +438,47 @@
|
||||||
"name" : "yield"
|
"name" : "yield"
|
||||||
} ],
|
} ],
|
||||||
"name" : "java.lang.Thread"
|
"name" : "java.lang.Thread"
|
||||||
|
}, {
|
||||||
|
"allPublicConstructors" : true,
|
||||||
|
"allPublicFields" : true,
|
||||||
|
"methods" : [ {
|
||||||
|
"name" : "equals"
|
||||||
|
}, {
|
||||||
|
"name" : "getAuthority"
|
||||||
|
}, {
|
||||||
|
"name" : "getContent"
|
||||||
|
}, {
|
||||||
|
"name" : "getDefaultPort"
|
||||||
|
}, {
|
||||||
|
"name" : "getFile"
|
||||||
|
}, {
|
||||||
|
"name" : "getHost"
|
||||||
|
}, {
|
||||||
|
"name" : "getPath"
|
||||||
|
}, {
|
||||||
|
"name" : "getPort"
|
||||||
|
}, {
|
||||||
|
"name" : "getProtocol"
|
||||||
|
}, {
|
||||||
|
"name" : "getQuery"
|
||||||
|
}, {
|
||||||
|
"name" : "getRef"
|
||||||
|
}, {
|
||||||
|
"name" : "getUserInfo"
|
||||||
|
}, {
|
||||||
|
"name" : "hashCode"
|
||||||
|
}, {
|
||||||
|
"name" : "openConnection"
|
||||||
|
}, {
|
||||||
|
"name" : "openStream"
|
||||||
|
}, {
|
||||||
|
"name" : "sameFile"
|
||||||
|
}, {
|
||||||
|
"name" : "toExternalForm"
|
||||||
|
}, {
|
||||||
|
"name" : "toString"
|
||||||
|
}, {
|
||||||
|
"name" : "toURI"
|
||||||
|
} ],
|
||||||
|
"name" : "java.net.URL"
|
||||||
} ]
|
} ]
|
||||||
|
|
@ -23,7 +23,9 @@ BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
||||||
# mkdir -p src/sci
|
# mkdir -p src/sci
|
||||||
# cp -R /tmp/sci/src/* src
|
# cp -R /tmp/sci/src/* src
|
||||||
|
|
||||||
|
lein with-profiles +reflection do run
|
||||||
lein do clean, uberjar
|
lein do clean, uberjar
|
||||||
|
|
||||||
$NATIVE_IMAGE \
|
$NATIVE_IMAGE \
|
||||||
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
||||||
-H:Name=bb \
|
-H:Name=bb \
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,11 @@
|
||||||
clojure.lang.LineNumberingPushbackReader
|
clojure.lang.LineNumberingPushbackReader
|
||||||
java.io.BufferedReader
|
java.io.BufferedReader
|
||||||
java.io.BufferedWriter
|
java.io.BufferedWriter
|
||||||
|
java.io.ByteArrayInputStream
|
||||||
|
java.io.ByteArrayOutputStream
|
||||||
java.io.File
|
java.io.File
|
||||||
java.io.InputStream
|
java.io.InputStream
|
||||||
|
java.io.IOException
|
||||||
java.io.OutputStream
|
java.io.OutputStream
|
||||||
java.io.StringReader
|
java.io.StringReader
|
||||||
java.io.StringWriter
|
java.io.StringWriter
|
||||||
|
|
@ -29,6 +32,11 @@
|
||||||
java.lang.UNIXProcess$ProcessPipeOutputStream
|
java.lang.UNIXProcess$ProcessPipeOutputStream
|
||||||
java.lang.ProcessBuilder
|
java.lang.ProcessBuilder
|
||||||
java.lang.ProcessBuilder$Redirect
|
java.lang.ProcessBuilder$Redirect
|
||||||
|
java.net.URI
|
||||||
|
java.net.HttpURLConnection
|
||||||
|
java.net.UnknownHostException
|
||||||
|
java.net.URLEncoder
|
||||||
|
java.net.URLDecoder
|
||||||
java.nio.file.CopyOption
|
java.nio.file.CopyOption
|
||||||
java.nio.file.FileAlreadyExistsException
|
java.nio.file.FileAlreadyExistsException
|
||||||
java.nio.file.Files
|
java.nio.file.Files
|
||||||
|
|
@ -62,7 +70,14 @@
|
||||||
java.util.Base64
|
java.util.Base64
|
||||||
java.util.Base64$Decoder
|
java.util.Base64$Decoder
|
||||||
java.util.Base64$Encoder
|
java.util.Base64$Encoder
|
||||||
|
java.util.zip.InflaterInputStream
|
||||||
|
java.util.zip.DeflaterInputStream
|
||||||
|
java.util.zip.GZIPInputStream
|
||||||
|
java.util.zip.GZIPOutputStream
|
||||||
|
javax.xml.bind.DatatypeConverter
|
||||||
sun.nio.fs.UnixPath ;; included because of permission check
|
sun.nio.fs.UnixPath ;; included because of permission check
|
||||||
|
sun.net.www.protocol.http.HttpURLConnection ;; needed for clj-http.lite
|
||||||
|
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream ;; needed for clj-http.lite
|
||||||
]
|
]
|
||||||
:custom-classes {'java.lang.Thread
|
:custom-classes {'java.lang.Thread
|
||||||
{:allPublicConstructors true
|
{:allPublicConstructors true
|
||||||
|
|
@ -100,7 +115,32 @@
|
||||||
{:name "sleep"}
|
{:name "sleep"}
|
||||||
{:name "start"}
|
{:name "start"}
|
||||||
{:name "toString"}
|
{:name "toString"}
|
||||||
{:name "yield"}]}}})
|
{:name "yield"}]}
|
||||||
|
'java.net.URL
|
||||||
|
{:allPublicConstructors true
|
||||||
|
:allPublicFields true
|
||||||
|
;; generated with `public-declared-method-names`, see in
|
||||||
|
;; `comment` below
|
||||||
|
:methods [{:name "equals"}
|
||||||
|
{:name "getAuthority"}
|
||||||
|
{:name "getContent"}
|
||||||
|
{:name "getDefaultPort"}
|
||||||
|
{:name "getFile"}
|
||||||
|
{:name "getHost"}
|
||||||
|
{:name "getPath"}
|
||||||
|
{:name "getPort"}
|
||||||
|
{:name "getProtocol"}
|
||||||
|
{:name "getQuery"}
|
||||||
|
{:name "getRef"}
|
||||||
|
{:name "getUserInfo"}
|
||||||
|
{:name "hashCode"}
|
||||||
|
{:name "openConnection"}
|
||||||
|
{:name "openStream"}
|
||||||
|
{:name "sameFile"}
|
||||||
|
;; not supported: {:name "setURLStreamHandlerFactory"}
|
||||||
|
{:name "toExternalForm"}
|
||||||
|
{:name "toString"}
|
||||||
|
{:name "toURI"}]}}})
|
||||||
|
|
||||||
(defmacro gen-class-map []
|
(defmacro gen-class-map []
|
||||||
(let [classes (concat (:default-classes classes)
|
(let [classes (concat (:default-classes classes)
|
||||||
|
|
@ -148,4 +188,5 @@
|
||||||
(vec)))
|
(vec)))
|
||||||
|
|
||||||
(public-declared-method-names java.lang.UNIXProcess)
|
(public-declared-method-names java.lang.UNIXProcess)
|
||||||
|
(public-declared-method-names java.net.URL)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
(def core-extras
|
(def core-extras
|
||||||
{'file-seq file-seq
|
{'file-seq file-seq
|
||||||
'agent agent
|
'agent agent
|
||||||
|
'instance? instance? ;; TODO: move to sci
|
||||||
'send send
|
'send send
|
||||||
'send-off send-off
|
'send-off send-off
|
||||||
'promise promise
|
'promise promise
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
(def io-namespace
|
(def io-namespace
|
||||||
{'as-relative-path io/as-relative-path
|
{'as-relative-path io/as-relative-path
|
||||||
|
'as-url io/as-url
|
||||||
'copy io/copy
|
'copy io/copy
|
||||||
'delete-file io/delete-file
|
'delete-file io/delete-file
|
||||||
'file io/file
|
'file io/file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue