Skip to content

Instantly share code, notes, and snippets.

@borkdude
Created April 29, 2021 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borkdude/d1bf6a20650862c38ee43c0656d72e39 to your computer and use it in GitHub Desktop.
Save borkdude/d1bf6a20650862c38ee43c0656d72e39 to your computer and use it in GitHub Desktop.
Decompile with double type hint
;; $ clj -Sdeps '{:deps {com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.0"}}}'
user=> (require '[clj-java-decompiler.core :refer [decompile]])
nil
user=> user=> (decompile (fn [^double x]))
// Decompiling class: user$fn__193
import clojure.lang.*;
public final class user$fn__193 extends AFunction implements DO
{
public static Object invokeStatic(final double x) {
return null;
}
@Override
public Object invoke(final Object o) {
return invokeStatic(RT.doubleCast(o));
}
@Override
public final Object invokePrim(final double x) {
return invokeStatic(x);
}
}
nil
user=> (decompile (fn [x]))
// Decompiling class: user$fn__197
import clojure.lang.*;
public final class user$fn__197 extends AFunction
{
public static Object invokeStatic(final Object x) {
return null;
}
@Override
public Object invoke(final Object x) {
return invokeStatic(x);
}
}
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment