Hello again! i would like to disallow user to use class constrator and force to use method, how can i do this?
NoScriptAccess is not allowed for constructor
public class Foo{
public Foo() {} // new Foo() should not be allowed
}
public class Bar{
Foo CreateFoo(){ return new Foo(); }
}
new Foo() // throw exception
let bar = new Bar()
let foo = bar.CreateFoo() // ok