13.07.2015 Views

4. Object Structures, Aliasing, and Encapsulation

4. Object Structures, Aliasing, and Encapsulation

4. Object Structures, Aliasing, and Encapsulation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Preventing widening:C3: Widening of references from a confined type toan unconfined type is forbidden in assignments,method call arguments, return statements, <strong>and</strong>explicit casts.C4: Methods invoked on a confined object musteither be non-native methods defined in aconfined class or be anonymous methods.C5: Constructors called from the constructors ofa confined class must either be defined by aconfined class or be anonymous constructors.Preventing transfer from the inside <strong>and</strong> outside:C6: Subtypes of java.lang.Throwable <strong>and</strong>java.lang.Thread must not be confined.C7: The declared type of public <strong>and</strong> protectedfields in unconfined types must not beconfined.C8: The return type of public <strong>and</strong> protectedmethods in unconfined types must not beconfined.13.05.13© A. Poetzsch-Heffter, TU Kaiserslautern38

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!