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

Explicit constructor overload selection should work with StaticClass as well

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • None
    • b22
    • generic
    • generic

        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);

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

                Created:
                Updated:
                Resolved: