JShell API: add setIdGenerator and setTempVariableNameGenerator

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 9-repo-kulla
    • Affects Version/s: None
    • Component/s: tools
    • None

      Since we can’t reasonably hide/transform the generated name, the only approach I could see for aligning temp var names with tool-ids is to add a callback to the API to generate the temp var name. Maybe:

        void setTempVariableNameGenerator(BiFunction<Integer, Integer, String> generator);

      Update: the id is visible to StackTraceElement.getFileName() queries so must also be internal and thus configurable.

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: