A private class that can be passed anywhere as a parameter - is such a thing possible?
<p>I want to define a class, <code>ClassA</code>, that can be passed as a parameter to any method or class in a project (global scope). However, I want to enforce a constraint which will insure that <code>ClassA</code> can only be instantiated within the scope of a single <code>ClassB</code>. In other words, I want the class to have private scope with respect to <code>ClassA</code> while still being able to pass that object as a parameter to methods and classes distributed throughout the project. </p>

<p>Is this possible?</p>
