4. Object Structures, Aliasing, and Encapsulation
4. Object Structures, Aliasing, and Encapsulation
4. Object Structures, Aliasing, and Encapsulation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Explanation:A type is called confined(confined, anonymous)- if it is declared with the keyword confined or- if it is an array type with a confined component type.A set of methods <strong>and</strong> constructors can be declaredas anonymous if the following properties hold:A1: The reference this can only be used foraccessing fields <strong>and</strong> calling anonymous methodsof the current instance or for object referencecomparison.A2: Anonymity of methods <strong>and</strong> constructors must bepreserved when overriding methods.A3: Constructors called from an anonymous constructormust be anonymous.A4: Native methods may not be declared anonymous.13.05.13© A. Poetzsch-Heffter, TU Kaiserslautern36