Page 2 of 2

Re: Re-implementing Vs Overloading methods

Posted: Fri Aug 07, 2009 11:18 am
by ConvertFromOldNGs
by Dean Cooper >> Wed, 2 Feb 2000 4:27:37 GMT
Makes perfect sense, and as far as I can tell is not possible in Jade because you cannot protect the constructor.

Currently in JADE you cannot (easily) implement the concept of a protected constructor. We'd like to address in the future. Internally we have the concept of "access classes" which will allow you, for a given class, to specify the classes whose methods are allowed to create instances of that class. In fact, structural support for this already exists in the meta-schema, but it needs to be exposed through the development environment and the compiler. With this feature you would be able to enforce that only methods of your factory class can create instances of a particular target class.

Dean.