Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8134939

Improve toString method of Dynalink DynamicMethod objects

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Resolved In Build:
      b81
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        jjs> java.lang.System.out.println
        [jdk.internal.dynalink.beans.OverloadedDynamicMethod java.io.PrintStream.println]

        Instead of the above, it toString returned all overloads, we could have output that looks like:

        jjs> java.lang.System.out.println
        [jdk.internal.dynalink.beans.OverloadedDynamicMethod
        void java.io.PrintStream.println(long)
        void java.io.PrintStream.println(Object)
        void java.io.PrintStream.println(char[])
        void java.io.PrintStream.println()
        void java.io.PrintStream.println(float)
        void java.io.PrintStream.println(boolean)
        void java.io.PrintStream.println(char)
        void java.io.PrintStream.println(int)
        void java.io.PrintStream.println(double)
        void java.io.PrintStream.println(String)
        ]

        also, constructors look unwieldy, e.g.

        [jdk.internal.dynalink.beans.SimpleDynamicMethod File java.io.File.java.io.File(String,String)]

        It'd be much better if they looked like a Java constructor:

        [jdk.internal.dynalink.beans.SimpleDynamicMethod java.io.File(String,String)]

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  attila Attila Szegedi
                  Reporter:
                  sundar Sundararajan Athijegannathan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: