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

Explicit constructor overload selection should work with StaticClass as well

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        With JDK- 8043232, indexed selection of constructor by explicit signature works. But one has to use NativeJavaPackage for that. Because we encourage the usage of Java.type (and StaticClass) as a better way compared to older Packages and dotted access, we need to provide a way to select constructor overload via StaticClass as well.


        var Color = Java.type("java.awt.Color")
        var C = Color["(int,int,int)"];
        var red = new C(255, 0,0);

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: