Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement different stratum for Java Debugger Interface

In the Java Debugger Interface documentation for the Location class, there's a paragraph discussing the "stratum" of the location. I've been looking around a bit for more detail on how one would go about implementing a new stratum (for, say, Scala or JRuby), but I haven't found much. Can anyone shed some light on the topic?

like image 319
jfager Avatar asked Aug 06 '10 13:08

jfager


1 Answers

Strata wouldn't really be appropriate for Scala or JRuby as they are compiled directly to bytecodes so the SourceFile and LineNumberTable attributes are enough. Strata are intended for things like JSP which are translated to a Java source file and them compiled. The strata are defined by an source map (SMAP) stored in a SourceDebugExtension attribute. The details of how this all works is part of JSR-45. Another example would be the State Machine Compiler though I don't believe it generates an SMAP. I'm also not sure if javac has an option for embedding the SMAP in the class file. You would then need a separate tool for that.

like image 146
Geoff Reedy Avatar answered Sep 18 '22 13:09

Geoff Reedy