Another similar question (second question):
If you have used ASM, I can do a lot of this "trace" type
functionality with the bytecode manipulator ASM (and obviously
reflection) but I was also looking for the clojure way.
http://asm.objectweb.org/).
Or maybe even reflection. Is there something in clojure that might
allow me to see when a function is called.
For example, with ASM, I can get the following information of a
method:
protected <init>(Ljava/lang/String;)V
ALOAD 0
INVOKESPECIAL java/lang/Object.<init>()V
ALOAD 0
ALOAD 1
PUTFIELD org/objectweb/asm/Attribute.type : Ljava/lang/String;
RETURN
MAXSTACK = 2
MAXLOCALS = 2
----
What is put on the stack and when methods are invoked.
Does something similar exist for ASM?