I am looking for a high level bytecode manipulation tool like Javassist, but that understands some of Scala peculiarities. Lower level bytecode manipulation tools should be relatively agnostic, but for my use cases something at the level of Javassist is much better. However a tool at that level needs to know about the source language and its bytecode mapping. Does something like this exist for Scala? So far I have been able to use Javassist with Scala for very simple things, but I have been bitten by some Scala/Java differences for a couple of other things.
相关问题
- Unusual use of the new keyword
- Get Runtime Type picked by implicit evidence
- What's the point of nonfinal singleton objects
- PlayFramework: how to transform each element of a
- Error in Scala Compiler: java.lang.AssertionError:
相关文章
- Gatling拓展插件开发,check(bodyString.saveAs("key"))怎么实现
- RDF libraries for Scala [closed]
- Why is my Dispatching on Actors scaled down in Akk
- How do you run cucumber with Scala 2.11 and sbt 0.
- java.lang.VerifyError: Stack map does not match th
- GRPC: make high-throughput client in Java/Scala
- Setting up multiple test folders in a SBT project
- Testing request with CSRF Token in Play framework
I don't think that such a tool exists (yet). The current situation is, that you cannot mix compilation units compiled with different versions of Scala, i.e. a class compiled with Scala 2.9 will not interoperate with a class compiled with Scala 2.10.
When you use Scala 2.10, you can use Scala reflection and Scala macros to reach similar goals as with bytecode modification. For me this looks like the most future proof way.
One of your questions aimed at adding a serial version ID. This should definitely be possible with Scala macros. With Scala macros it shoudl even be possible to manage the serial version ids in an external database according to API changes.