blob: 9717350ee81ac704e6e278c535058f65190dbf6d [file] [log] [blame]
<!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">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s6.2.b.html" rel="next">&sect;6.2.(b)&nbsp;Interface for explicit lowering&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s6.html" rel="section">&sect;6&nbsp;Object Teams API</a>&nbsp;&gt;&nbsp;<a class="nav" href="s6.2.html" rel="section">&sect;6.2&nbsp;Other API Elements</a></div>
<div class="subsect depth3" id="s6.2.a">
<h4 class="subsect">&sect;6.2.(a)&nbsp;<span class="title">Interfaces for role encapsulation</span><a class="img" href="s6.2.a.html"
title="PermaLink to (a)&nbsp;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 &sect;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="&sect;7&nbsp;Role Encapsulation" class="sect">&sect;7</a>.
</p>
</div>
<table class="nav">
<tr>
<td class="back"></td>
<td class="top"><a href="index.html" rel="contents">&uarr;&nbsp;Table of Contents&nbsp;&uarr;</a></td>
<td class="next"><a href="s6.2.b.html" rel="next">&sect;6.2.(b)&nbsp;Interface for explicit lowering&nbsp;&gt;&gt;</a></td>
</tr>
</table>
<div class="breadcrumb"><a class="nav" href="s6.html" rel="section">&sect;6&nbsp;Object Teams API</a>&nbsp;&gt;&nbsp;<a class="nav" href="s6.2.html" rel="section">&sect;6.2&nbsp;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>&copy; Stephan Herrmann, Christine Hundt, Marco Mosconi</address>
OT/J version 1.3 &mdash; last modified: 2010-06-08
</div>
</body>
</html>