| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../xhtml1-strict.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| <link rel="stylesheet" type="text/css" href="../css/ot.css" /> |
| <link rel="stylesheet" type="text/css" href="../css/otjld.css" /> |
| <title>OT/J Language Definition v1.3</title> |
| </head> |
| <body class="otdt"> |
| <div id="content"> |
| <table class="nav"> |
| <tr> |
| <td class="back"><a id="top"></a></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s6.2.b.html" rel="next">§6.2.(b) Interface for explicit lowering >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s6.html" rel="section">§6 Object Teams API</a> > <a class="nav" href="s6.2.html" rel="section">§6.2 Other API Elements</a></div> |
| <div class="subsect depth3" id="s6.2.a"> |
| <h4 class="subsect">§6.2.(a) <span class="title">Interfaces for role encapsulation</span><a class="img" href="s6.2.a.html" |
| title="PermaLink to (a) Interfaces for role encapsulation"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>A set of pre-defined types exist that do <span class="underline">not</span> extend <code>java.lang.Object</code> |
| and have <span class="underline">no</span> features except the operators <code>==</code> and <code>!=</code>. |
| |
| </p> |
| <div class="note"> |
| <h5>Note:</h5> |
| The JLS defines that each interface declares all methods defined in <code>java.lang.Object</code> |
| (<a href="http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html#32392" |
| class="ext">JLS §9.2</a>) |
| and also each object referenced by an interface type can be widened to <code>java.lang.Object</code>. |
| Compilers commonly implement this by declaring <code>java.lang.Object</code> the super-type of all interfaces. |
| Such implementation has no visible difference with respect to the more complex definition in the JLS. |
| |
| </div> |
| <p>These predefined types are |
| |
| </p> |
| <dl> |
| <dt><code>org.objectteams.IConfined</code></dt> |
| <dd>regular interface</dd> |
| <dt><code>org.objectteams.ITeam.IConfined</code></dt> |
| <dd>role interface</dd> |
| <dt><code>org.objectteams.Team.Confined</code></dt> |
| <dd>role class</dd> |
| </dl> |
| <p>These types provide no new functionality but inheriting from these types influences the semantics with respect to encapsulation. |
| |
| The purpose and usage of these types is described in <a href="s7.html" title="§7 Role Encapsulation" class="sect">§7</a>. |
| |
| </p> |
| </div> |
| <table class="nav"> |
| <tr> |
| <td class="back"></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s6.2.b.html" rel="next">§6.2.(b) Interface for explicit lowering >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s6.html" rel="section">§6 Object Teams API</a> > <a class="nav" href="s6.2.html" rel="section">§6.2 Other API Elements</a></div> |
| </div> |
| <div id="footer"> |
| <hr /><a class="w3c img" href="http://jigsaw.w3.org/css-validator/check/referer" |
| shape="rect"><img src="../images/valid-css2-blue.png" alt="Valid CSS!" height="31" width="88" /></a><a class="w3c img" href="http://validator.w3.org/check?uri=referer" shape="rect"><img src="../images/valid-xhtml10-blue.png" alt="Valid XHTML 1.0 Strict" height="31" |
| width="88" /></a><address>© Stephan Herrmann, Christine Hundt, Marco Mosconi</address> |
| OT/J version 1.3 — last modified: 2010-06-08 |
| </div> |
| </body> |
| </html> |