In order to prevent from incompatible changes, that would break nashorn debugging, please create debugger API classes, or classify existing classes as debugger API. It does not have to be a public API as such, but standardized classes, that will not change in an incompatible way in the future. For the debugger, it's much more easy and much faster to access field values, than to invoke method calls. Therefore, it's best in form of fields, where possible. For the debugging purposes we use following classes, methods and fields: jdk.nashorn.internal.runtime.DebuggerSupport and it's methods: "valueInfo()", "valueInfos()", "eval()", "valueAsString()" jdk.nashorn.internal.runtime.DebuggerSupport$DebuggerValueDesc and it's fields: "key", "expandable", "valueAsObject", "valueAsString" jdk.nashorn.internal.runtime.Source we rely on that an instance of this class is in "source" static field of every compiled script class and it's fields: "name", "hash", "data" and fields "array", "url" in classes implementing jdk.nashorn.internal.runtime.Source$Data jdk.nashorn.internal.runtime.ScriptFunctionData and it's methods: "invoke()", "construct()", "getGenericInvoker()", "getGenericConstructor()" java.lang.invoke.MethodHandle and it's fields "member", "clazz" And we rely on that the compiled scripts are in classes, whose canonical path starts with: jdk.nashorn.internal.scripts.Script$
|