I do not think there is a way to define this directly. Yes, since SourceRebel says you can set the system property. Personally, I would not do this, since then you had some kind of hidden connection: your function depends on a system property that must be correctly configured for it to work, but there is nothing clearly defined in the interface to reflect this, I think you it would be much better if you just pass in a parameter that says what it is and let the caller answer for the correct parameter. Then the existence of this parameter can be clearly seen in the signature of the function, and anyone who uses it will have a clear idea that they need to set it correctly. The correct assignment of the caller should be trivial, since presumably at some point in the call chain you are either calling from a desktop application or from a web page, and this caller knows what it is.
source share