4. Object Structures, Aliasing, and Encapsulation
4. Object Structures, Aliasing, and Encapsulation
4. Object Structures, Aliasing, and Encapsulation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
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