Community
Participate
Working Groups
externalType Class type JavaObject{packageName = "java.lang"} static function forName(name string in) returns(Class); end package pkg; program prog function main() c Class? = Class.forName("my.test"); end end Generates: Class c = null; String eze$Temp1 = Constants.EMPTY_STRING; eze$Temp1 = "my.test"; c = pkg.Class.forName(eze$Temp1); It's using the EGL package instead of the value from packageName.
Fixed with a change to ExternalTypeTemplates. When accessing static functions and fields, we'll pay attention to @packageName and @externalName on the ET. Note, at the moment there's a separate bug in the generator which prevents your testcase from generating clean code. To work around it, put the declaration and initialization of variable 'c' in different statements.
Verified