Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 1 | <!DOCTYPE html |
| 2 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../xhtml1-strict.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 6 | <link rel="stylesheet" type="text/css" href="../css/ot.css" /> |
| 7 | <link rel="stylesheet" type="text/css" href="../css/otjld.css" /> |
| 8 | <title>OT/J Language Definition v1.3</title> |
| 9 | </head> |
| 10 | <body class="otdt"> |
| 11 | <div id="content"> |
| 12 | <table class="nav"> |
| 13 | <tr> |
| 14 | <td class="back"><a id="top"></a></td> |
| 15 | <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| 16 | <td class="next"><a href="s1.2.html" rel="next">§1.2 Role classes and objects >></a></td> |
| 17 | </tr> |
| 18 | </table> |
| 19 | <div class="breadcrumb"><a class="nav" href="s1.html" rel="section">§1 Teams and Roles</a></div> |
| 20 | <div class="sect depth2" id="s1.1"> |
Stephan Herrmann | 109893e | 2010-05-18 22:02:53 +0000 | [diff] [blame] | 21 | <h2 class="sect">§1.1 Team classes<a class="img" href="s1.1.html" |
| 22 | title="PermaLink to §1.1 Team classes"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| 23 | alt="" /></a></h2> |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 24 | <div class="syntaxlink"><a href="sA.html#sA.1.1" title="§A.1.1 ClassDeclaration" |
| 25 | class="syntax">→ Syntax §A.1.1</a></div> |
| 26 | <p>A class declared with the modifier <code>team</code> is a <em>team class</em> (or team for short). |
| 27 | |
| 28 | </p> |
| 29 | <div class="listing example frame"> |
| 30 | <table class="listing"> |
| 31 | <tr class="line odd"> |
| 32 | <td class="ln">1</td> |
| 33 | <td><pre><b>public</b> <em><b>team</b> <b>class</b> MyTeamA</em> {</pre></td> |
| 34 | </tr> |
| 35 | <tr class="line even"> |
| 36 | <td class="ln">2</td> |
| 37 | <td><pre> ...</pre></td> |
| 38 | </tr> |
| 39 | <tr class="line odd"> |
| 40 | <td class="ln">3</td> |
| 41 | <td><pre>}</pre></td> |
| 42 | </tr> |
| 43 | </table> |
| 44 | </div> |
| 45 | <p>Teams are meant as containers for <em>roles</em>, which are defined in the following |
| 46 | paragraphs. |
| 47 | |
| 48 | </p> |
| 49 | <div class="listing example frame"> |
| 50 | <table class="listing"> |
| 51 | <tr class="line odd"> |
| 52 | <td class="ln">1</td> |
| 53 | <td><pre><b>public</b> <b>team</b> <b>class</b> MyTeamA {</pre></td> |
| 54 | </tr> |
| 55 | <tr class="line even"> |
| 56 | <td class="ln">2</td> |
| 57 | <td><pre> <b>public</b> <em><b>class</b> MyRole</em></pre></td> |
| 58 | </tr> |
| 59 | <tr class="line odd"> |
| 60 | <td class="ln">3</td> |
| 61 | <td><pre> ...</pre></td> |
| 62 | </tr> |
| 63 | <tr class="line even"> |
| 64 | <td class="ln">4</td> |
| 65 | <td><pre> }</pre></td> |
| 66 | </tr> |
| 67 | <tr class="line odd"> |
| 68 | <td class="ln">5</td> |
| 69 | <td><pre>}</pre></td> |
| 70 | </tr> |
| 71 | </table> |
| 72 | </div> |
| 73 | <p>Teams introduce a new variant of inheritance for contained role classes |
| 74 | (see <a href="s1.3.1.html" |
| 75 | title="§1.3.1 Acquisition and implicit inheritance of role classes" |
| 76 | class="sect">§1.3.1</a> below). |
| 77 | Other properties of teams, which are defined in later sections, are: |
| 78 | |
| 79 | </p> |
| 80 | <ul> |
| 81 | <li>Team activation (<a href="s5.html" title="§5 Team Activation" class="sect">§5</a>) |
| 82 | </li> |
| 83 | <li>Abstractness and instantiation (<a href="s2.5.html" title="§2.5 Abstract Roles" class="sect">§2.5</a>) |
| 84 | </li> |
| 85 | <li>Declared lifting in team methods (<a href="s2.3.2.html" title="§2.3.2 Declared lifting" class="sect">§2.3.2</a>) |
| 86 | </li> |
| 87 | <li>Reflective functions defined in <code>org.objectteams.ITeam</code> (<a href="s6.1.html" title="§6.1 Reflection" class="sect">§6.1</a>) |
| 88 | </li> |
| 89 | </ul> |
| 90 | <p>Apart from these differences, team classes are regular Java classes with |
| 91 | methods and fields, whose instances are regular Java objects. |
| 92 | |
| 93 | </p> |
| 94 | </div> |
| 95 | <table class="nav"> |
| 96 | <tr> |
| 97 | <td class="back"></td> |
| 98 | <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| 99 | <td class="next"><a href="s1.2.html" rel="next">§1.2 Role classes and objects >></a></td> |
| 100 | </tr> |
| 101 | </table> |
| 102 | <div class="breadcrumb"><a class="nav" href="s1.html" rel="section">§1 Teams and Roles</a></div> |
| 103 | </div> |
| 104 | <div id="footer"> |
Stephan Herrmann | 109893e | 2010-05-18 22:02:53 +0000 | [diff] [blame] | 105 | <hr /><a class="w3c img" href="http://jigsaw.w3.org/css-validator/check/referer" |
| 106 | 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" |
| 107 | width="88" /></a><address>© Stephan Herrmann, Christine Hundt, Marco Mosconi</address> |
Stephan Herrmann | 8f0fa31 | 2010-06-08 18:24:55 +0000 | [diff] [blame^] | 108 | OT/J version 1.3 — last modified: 2010-06-08 |
Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 109 | </div> |
| 110 | </body> |
| 111 | </html> |