Open maheshkurmi opened 1 year ago
Hello @maheshkurmi
JSweet has minimal support for reflection. It depends on whether you use J4TS or not, but you can expect basic introspection to be available (get methods of a class, get class name, get method name .. you can find detailed implementations in JSweet adapter: https://github.com/cincheo/jsweet/blob/develop/transpiler/src/main/java/org/jsweet/transpiler/extension/Java2TypeScriptAdapter.java#L1271)
but AFAIR you cannot expect to create instances dynamically with newInstance.
Please also read: https://github.com/cincheo/jsweet/blob/master/doc/jsweet-language-specifications.md#allowed-java-objects
Does jsweet support reflection? Upto what extent? Following do not work
Argument of type 'StringConstructor' is not assignable to parameter of type
Array.newInstance(itemClas, 0).getClass()
throws error