| <!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="s1.2.html" rel="next">§1.2 Role classes and objects >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s1.html" rel="section">§1 Teams and Roles</a></div> |
| <div class="sect depth2" id="s1.1"> |
| <h2 class="sect">§1.1 Team classes<a class="img" href="s1.1.html" |
| title="PermaLink to §1.1 Team classes"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h2> |
| <div class="syntaxlink"><a href="sA.html#sA.1.1" title="§A.1.1 ClassDeclaration" |
| class="syntax">→ Syntax §A.1.1</a></div> |
| <p>A class declared with the modifier <code>team</code> is a <em>team class</em> (or team for short). |
| |
| </p> |
| <div class="listing example frame"> |
| <table class="listing"> |
| <tr class="line odd"> |
| <td class="ln">1</td> |
| <td><pre><b>public</b> <em><b>team</b> <b>class</b> MyTeamA</em> {</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">2</td> |
| <td><pre> ...</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">3</td> |
| <td><pre>}</pre></td> |
| </tr> |
| </table> |
| </div> |
| <p>Teams are meant as containers for <em>roles</em>, which are defined in the following |
| paragraphs. |
| |
| </p> |
| <div class="listing example frame"> |
| <table class="listing"> |
| <tr class="line odd"> |
| <td class="ln">1</td> |
| <td><pre><b>public</b> <b>team</b> <b>class</b> MyTeamA {</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">2</td> |
| <td><pre> <b>public</b> <em><b>class</b> MyRole</em></pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">3</td> |
| <td><pre> ...</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">4</td> |
| <td><pre> }</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">5</td> |
| <td><pre>}</pre></td> |
| </tr> |
| </table> |
| </div> |
| <p>Teams introduce a new variant of inheritance for contained role classes |
| (see <a href="s1.3.1.html" |
| title="§1.3.1 Acquisition and implicit inheritance of role classes" |
| class="sect">§1.3.1</a> below). |
| Other properties of teams, which are defined in later sections, are: |
| |
| </p> |
| <ul> |
| <li>Team activation (<a href="s5.html" title="§5 Team Activation" class="sect">§5</a>) |
| </li> |
| <li>Abstractness and instantiation (<a href="s2.5.html" title="§2.5 Abstract Roles" class="sect">§2.5</a>) |
| </li> |
| <li>Declared lifting in team methods (<a href="s2.3.2.html" title="§2.3.2 Declared lifting" class="sect">§2.3.2</a>) |
| </li> |
| <li>Reflective functions defined in <code>org.objectteams.ITeam</code> (<a href="s6.1.html" title="§6.1 Reflection" class="sect">§6.1</a>) |
| </li> |
| </ul> |
| <p>Apart from these differences, team classes are regular Java classes with |
| methods and fields, whose instances are regular Java objects. |
| |
| </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="s1.2.html" rel="next">§1.2 Role classes and objects >></a></td> |
| </tr> |
| </table> |
| <div class="breadcrumb"><a class="nav" href="s1.html" rel="section">§1 Teams and Roles</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> |