| <!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.1</title> |
| </head> |
| <body class="otdt"> |
| <div id="content"> |
| <table class="nav"> |
| <tr> |
| <td class="back"><a id="top"></a><a href="s5.html" rel="prev"><< §5 Team Activation</a></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s7.html" rel="next">§7 Role Encapsulation >></a></td> |
| </tr> |
| </table> |
| <div class="chapter" id="s6"> |
| <div class="headl"> |
| <div class="headr"> |
| <h1>§6 Object Teams API</h1> |
| </div> |
| </div> |
| <div id="toc-box"> |
| <ul class="toc-box"> |
| <li><a href="s6.html">§6 Object Teams API</a></li> |
| <li><a href="#s6.1">§6.1 Reflection</a></li> |
| <li><a href="#s6.2">§6.2 Other API Elements</a></li> |
| <li><a href="#s6.3">§6.3 Annotations</a></li> |
| </ul> |
| </div> |
| <div class="intro"> |
| <h3>The role of predefined types and methods</h3> |
| <div class="line"></div> |
| <div class="term">Application Programming Interface (API)</div> |
| <div class="termdesc">Some features of OT/J are supported without introducing new syntax but by predefined types and methods.</div> |
| <div class="line"></div> |
| </div> |
| <div class="sect depth2" id="s6.1"> |
| <h2 class="sect">§6.1 Reflection<a class="img" href="s6.html#s6.1" |
| title="PermaLink to §6.1 Reflection"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a><span class="toplink"><a href="#top">↑ §6</a></span></h2> |
| <p>Object Teams supports reflection with respect to teams, roles, and role-base relationships. |
| |
| </p> |
| <div class="subsect depth3" id="s6.1.a"> |
| <h4 class="subsect">(a) <span class="title">Interface to the role registry</span><a class="img" href="s6.html#s6.1.a" |
| title="PermaLink to (a) Interface to the role registry"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>Each team instance internally has a registry of known role objects indexed by their base object. |
| Programmers may make use of this registry using the following reflective methods defined in |
| <code>org.objectteams.ITeam</code>: |
| |
| </p> |
| <dl> |
| <dt><code>boolean hasRole ( Object aBase ) ;</code></dt> |
| <dd>This method checks whether a role for the passed base object already exists in the target team. |
| |
| </dd> |
| <dt><code>boolean hasRole ( Object aBase, Class roleType ) ;</code></dt> |
| <dd>This method checks whether a instance of type <code>roleType</code> as a role for the passed base object |
| <code>aBase</code> already exists in the target team. |
| The role may also be of any subtype of the specified role type.<br /> |
| If <code>roleType</code> is not a member type of the current team an <code>IllegalArgumentException</code> is thrown. |
| |
| </dd> |
| <dt><code>Object getRole ( Object aBase ) ;</code></dt> |
| <dd>If the passed base object <code>aBase</code> already has a role in the target team, this role is returned. |
| Otherwise <code>null</code> is returned. |
| |
| </dd> |
| <dt><code><T> T getRole ( Object aBase, Class<T> roleType ) ;</code></dt> |
| <dd>If the passed base object <code>aBase</code> already has a role in the target team that is assignable to the type represented by <code>roleType</code>, |
| this role is returned. Otherwise <code>null</code> is returned.<br /> |
| If <code>roleType</code> is not a member type of the current team an <code>IllegalArgumentException</code> is thrown. |
| |
| </dd> |
| <dt><code>Object[] getAllRoles () ;</code></dt> |
| <dd>Retrieves all existing (registered) <a href="s2.html#s2.1.a" title="§2.1.(a) Role-base binding" |
| class="sect">bound roles (§2.1.(a))</a> in the target team. |
| <br /> |
| This method uses internal structures of weak references. For that reason it may return role instances which were about |
| to be reclaimed by the garbage collector. If performance permits, it is thus advisable to always call <code>System.gc()</code> |
| prior to calling <code>getAllRoles()</code> in order to achieve deterministic results (see also <a href="s2.html#s2.1.f" |
| title="§2.1.(f) Effect on garbage collection" |
| class="sect">§2.1.(f)</a>). |
| |
| </dd> |
| <dt><code><T> T[] getAllRoles ( Class<T> roleType ) ;</code></dt> |
| <dd>Retrieves all existing (registered) <a href="s2.html#s2.1.a" title="§2.1.(a) Role-base binding" |
| class="sect">bound roles (§2.1.(a))</a> in the target team that are assignable to the type represented by <code>roleType</code>. |
| <br /> |
| If <code>roleType</code> is not a member type of the current team an <code>IllegalArgumentException</code> is thrown. |
| <br /> |
| See the note about garbage collection above. |
| |
| </dd> |
| <dt><code>void unregisterRole ( Object aRole ) ;</code></dt> |
| <dd>This method unregisters the passed role object from the target team. Thus the corresponding base looses this role. |
| After calling this method the role should no longer be used. |
| |
| </dd> |
| <dt><code>void unregisterRole ( Object aRole, Class roleType ) ;</code></dt> |
| <dd>This method unregisters the passed role object from the target team. Thus the corresponding base loses this role. |
| After calling this method the role should no longer be used. |
| The only difference to the previous method is improved speed because no search for the corresponding registry |
| has to be performed. |
| <br /> |
| If <code>roleType</code> is not a member type of the current team an <code>IllegalArgumentException</code> is thrown. |
| |
| </dd> |
| </dl> |
| <p>It is desirable and possible to use these methods within guards (see <a href="s5.html#s5.4" title="§5.4 Guard predicates" class="sect">§5.4</a>). |
| These methods allow to write the specification of guards in a more concise and more expressive way. Determined by the signature, |
| |
| the first four methods can only be used in a base-level guard (<a href="s5.html#s5.4.2" title="§5.4.2 Base guards" class="sect">§5.4.2</a>) because they require a reference to a base object. |
| |
| </p> |
| <h5 class="listing">Example code (Guards and Reflection):</h5> |
| <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> SpecialConditions {</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">2</td> |
| <td><pre> <b>public</b> <b>void</b> participate(Account <b>as</b> BonusAccount ba) {}</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">3</td> |
| <td><pre> <b>public</b> <b>class</b> BonusAccount <b>playedBy</b> Account</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">4</td> |
| <td><pre> <b>base</b> when(SpecialConditions.this.<em>hasRole</em>(base, BonusAccount.class))</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">5</td> |
| <td><pre> {</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">6</td> |
| <td><pre> <b>callin</b> <b>void</b> creditBonus(<b>int</b> amount) {</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">7</td> |
| <td><pre> base.creditBonus(amount + bonus);</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">8</td> |
| <td><pre> }</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">9</td> |
| <td><pre> <b>void</b> creditBonus(<b>int</b> amount) <b><-</b> <b>replace</b> <b>void</b> credit(<b>int</b> i)</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">10</td> |
| <td><pre> <b>base</b> <b>when</b> (i > 1000);</pre></td> |
| </tr> |
| <tr class="line odd"> |
| <td class="ln">11</td> |
| <td><pre> }</pre></td> |
| </tr> |
| <tr class="line even"> |
| <td class="ln">12</td> |
| <td><pre>}</pre></td> |
| </tr> |
| </table> |
| </div> |
| <div class="codecomment"> |
| <h5>Effects:</h5> |
| This teams provides a bonus system for registered <code>Account</code>s. Every time an amount of more than 1000 is |
| deposited to a registered account, additional 1% of the amount is credited. |
| |
| <ul> |
| <li>The team level method <code>participate</code> in line 2 uses declared lifting (see <a href="s2.html#s2.3.2" title="§2.3.2 Declared lifting" |
| class="sect">§2.3.2</a>) |
| to allow the passed <code>Account</code> object to participate the bonus system provided by the |
| <code>SpecialConditions</code> team. |
| |
| </li> |
| <li>The base guard in line 4 uses the reflective method <code>hasRole</code> to check whether the base object already has a role |
| of type <code>BonusAccount</code> in the surrounding team. The expression <code>BonusAccount.class</code> returns |
| the <code>java.lang.Class</code> object representing the role <code>BonusAccount</code> |
| (see <a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#251530" |
| class="ext">JLS §15.8.2</a>). |
| This guard ensures, that only accounts explicitly registered via <code>participate</code> are ever decorated with a role of type <code>BonusAccount</code>. |
| |
| </li> |
| <li>The method binding guard in line 10 restricts the callin to <code>creditBonus</code> to calls where |
| the base method argument <code>amount</code> is greater than 1000. |
| |
| </li> |
| </ul> |
| </div> |
| </div> |
| <div class="subsect depth3" id="s6.1.b"> |
| <h4 class="subsect">(b) <span class="title">Behavioral reflection</span><a class="img" href="s6.html#s6.1.b" |
| title="PermaLink to (b) Behavioral reflection"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>The following reflective methods defined in org.objectteams.ITeam can be used to |
| inspect the dynamic behavior of a team: |
| |
| </p> |
| <dl> |
| <dt><code>boolean isExecutingCallin () ;</code></dt> |
| <dd>This method is used to inspect whether a control flow has already been intercepted by at least one callin binding of the current |
| team. |
| It can be used to avoid undesirable re-entrance to a team. |
| |
| </dd> |
| <dt><code>boolean isActive () ;</code></dt> |
| <dd>This method checks whether the team instance is active for the current thread. |
| |
| </dd> |
| <dt><code>boolean isActive ( Thread aThread ) ;</code></dt> |
| <dd>This method checks whether the team instance is active for the thread <code>aThread</code>. |
| |
| </dd> |
| </dl> |
| </div> |
| <div class="subsect depth3" id="s6.1.c"> |
| <h4 class="subsect">(c) <span class="title">Class literals for roles</span><a class="img" href="s6.html#s6.1.c" |
| title="PermaLink to (c) Class literals for roles"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>The Java syntax for so-called class literals, <code>MyClass<strong>.class</strong></code> |
| (see <a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#251530" |
| class="ext">JLS §15.8.2</a>) |
| can be used for role types with slightly changed semantics: Role types are virtual types (<a href="s1.html#s1.3.1" |
| title="§1.3.1 Acquisition and implicit inheritance of role classes" |
| class="sect">§1.3.1</a>) |
| that are bound dynamically (<a href="s1.html#s1.3.1.e" |
| title="§1.3.1.(e) Dynamic binding of types" |
| class="sect">§1.3.1.(e)</a>). This applies to role class literals, too. |
| From this follows the constraint that a role class literal can only be used within the non-static context of a team, |
| ie., for evaluating a role class literal an enclosing team instance must be in scope. |
| <br /> |
| Unlike regular type checking for role types, the class literal itself does not have a dependent type. |
| Thus type checking of calls to methods like <code>hasRole(Object, Class)</code> cannot detect, whether the <code>Class</code> instance |
| has actually been obtained from the correct team instance. Any attempt to pass a class that is not known |
| as a bound role within the given team results in an <code>IllegalArgumentException</code> at run-time. |
| |
| </p> |
| </div> |
| </div> |
| <div class="sect depth2" id="s6.2"> |
| <h2 class="sect">§6.2 Other API Elements<a class="img" href="s6.html#s6.2" |
| title="PermaLink to §6.2 Other API Elements"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a><span class="toplink"><a href="#top">↑ §6</a></span></h2> |
| <div class="subsect depth3" id="s6.2.a"> |
| <h4 class="subsect">(a) <span class="title">Interfaces for role encapsulation</span><a class="img" href="s6.html#s6.2.a" |
| 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> |
| <div class="subsect depth3" id="s6.2.b"> |
| <h4 class="subsect">(b) <span class="title">Interface for explicit lowering</span><a class="img" href="s6.html#s6.2.b" |
| title="PermaLink to (b) Interface for explicit lowering"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>The following role interface exists for the purpose of allowing explicit lowering: |
| |
| </p> |
| <dl> |
| <dt><code>org.objectteams.ITeam.ILowerable</code></dt> |
| <dd>role interface</dd> |
| </dl> |
| <p>This interface was introduced in detail in <a href="s2.html#s2.2.d" title="§2.2.(d) Explicit lowering" |
| class="sect">§2.2.(d)</a>. |
| |
| </p> |
| </div> |
| <div class="subsect depth3" id="s6.2.c"> |
| <h4 class="subsect">(c) <span class="title">Team activation methods</span><a class="img" href="s6.html#s6.2.c" |
| title="PermaLink to (c) Team activation methods"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>Every team can be activated and deactivated by predefined methods of the interface <code>org.objectteams.ITeam</code>. |
| |
| </p> |
| <dl> |
| <dt><code>activate()</code> and <code>activate(Thread th)</code></dt> |
| <dd>Methods for activation of a team</dd> |
| <dt><code>deactivate()</code> and <code>deactivate(Thread th)</code></dt> |
| <dd>Methods for deactivation of a team</dd> |
| </dl> |
| <p>The usage of these Methods is described in <a href="s5.html#s5.2.b" title="§5.2.(b) Imperative activation" |
| class="sect">§5.2.(b)</a>. |
| |
| </p> |
| </div> |
| <div class="subsect depth3" id="s6.2.d"> |
| <h4 class="subsect">(d) <span class="title">Exceptions</span><a class="img" href="s6.html#s6.2.d" title="PermaLink to (d) Exceptions"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>The following <code>Exceptions</code> can be thrown during the execution of an ObjectTeam/Java program: |
| |
| </p> |
| <dl> |
| <dt><code>ResultNotProvidedException</code></dt> |
| <dd>Thrown if a replace callin without a base call does not provide the necessary (primitive type) base result |
| (see <a href="s4.html#s4.3.e" title="§4.3.(e) Fragile callin binding" |
| class="sect">§4.3.(e)</a>). |
| </dd> |
| <dt><code>LiftingFailedException</code></dt> |
| <dd>Thrown if an actual ambiguity occurs during lifting (see <a href="s2.html#s2.3.4.c" title="§2.3.4.(c) Actual ambiguity" |
| class="sect">§2.3.4.(c)</a>) |
| or if lifting would need to instantiate an abstract role class (see <a href="s2.html#s2.5.b" title="§2.5.(b) Relevant roles" |
| class="sect">§2.5.(b)</a>). |
| This is a checked exception. |
| See <a href="s2.html#s2.3.5" |
| title="§2.3.5 Consequences of lifting problems" |
| class="sect">§2.3.5</a> for more information. |
| </dd> |
| <dt><code>WrongRoleException</code></dt> |
| <dd>Thrown during lifting if the base object has, with respect to the same team instance, previously been lifted |
| to a role type that is not conform to the currently requested type |
| (see <a href="s2.html#s2.3.4.d" title="§2.3.4.(d) Mismatching role" |
| class="sect">§2.3.4.(d)</a> and <a href="s2.html#s2.4.3" |
| title="§2.4.3 Role creation in the presence of smart lifting" |
| class="sect">§2.4.3</a>). |
| </dd> |
| <dt><code>DuplicateRoleException</code></dt> |
| <dd>Thrown during explicit role creation, if a new role is created for a base object, which already has a role |
| of the required type in the given team (see <a href="s2.html#s2.4.1.c" |
| title="§2.4.1.(c) Duplicate role runtime check" |
| class="sect">§2.4.1.(c)</a>). |
| </dd> |
| <dt><code>RoleCastException</code></dt> |
| <dd>Thrown during cast of an externalized role, if the casted expression is anchored to a different team instance |
| than the cast type (see <a href="s1.html#s1.2.4.b" title="§1.2.4.(b) Casting" class="sect">§1.2.4.(b)</a>). |
| </dd> |
| <dt><code>LiftingVetoException</code></dt> |
| <dd>This exception is used internally to abort the process of lifting when a relevant guard predicate (<a href="s5.html#s5.4" title="§5.4 Guard predicates" class="sect">§5.4</a>) evaluated to false. |
| Such exceptions thrown from generated code will never appear in client code, so there is usually no need to catch a <code>LiftingVetoException</code>. |
| However, in some situations it is useful to explicitly <em>throw</em> a <code>LiftingVetoException</code> from a lifting constructor (<a href="s2.html#s2.3.1.b" |
| title="§2.3.1.(b) Default lifting constructor" |
| class="sect">§2.3.1.(b)</a>) of a role. |
| This style allows to abort lifting even after the lifting constructor has started to work and also for method parameters |
| requiring lifting. |
| If lifting was triggered due to a callin method binding, this binding will simply not trigger if a <code>LiftingVetoException</code> is thrown |
| while preparing the call to the role method. |
| </dd> |
| </dl> |
| </div> |
| <div class="subsect depth3" id="s6.2.e"> |
| <h4 class="subsect">(e) <span class="title">Role migration</span><a class="img" href="s6.html#s6.2.e" |
| title="PermaLink to (e) Role migration"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>The following interfaces can be used to enable role migration:</p> |
| <dl> |
| <dt><code>IBaseMigratable</code></dt> |
| <dd>This interface declares a method |
| <div class="listing plain"><pre> |
| <code><B> <b>void</b> migrateToBase(B otherBase)</code> </pre></div> |
| and instructs the compiler to generate an implementation of this method |
| for any bound role declaring <code>IBaseMigratable</code> as its super-interface.<br /> |
| The effect of calling <code>migrateToBase</code> on a role instance is to re-bind this role to a new base instance. |
| The base instance must be compatible to the role's base class (in order to avoid problems during lifting the |
| compiler may require the base to be of the exact type of the role's base class). |
| Passing <code>null</code> to this method causes an <code>NullPointerException</code> to be thrown. |
| </dd> |
| <dt><code>ITeamMigratable</code></dt> |
| <dd>This interface declares a method |
| <div class="listing plain"><pre> |
| <code><R> R<@otherTeam> migrateToTeam(<b>final</b> ITeam otherTeam)</code></pre></div> |
| and instructs the compiler to |
| generate an implementation of this method for any role declaring <code>ITeamMigratable</code> as its super-interface.<br /> |
| The effect of calling <code>migrateToTeam</code> on a role instance is to re-bind this role to become a contained part of a new team instance. |
| The team instance must be of the exact type of the role's enclosing team. |
| Passing <code>null</code> to this method causes a <code>NullPointerException</code> to be thrown.<br /><div class="note"> |
| <h5>Caveat:</h5> |
| This method intentionally breaks the rules of family polymorphism: any reference <code>R<@previousTeam> r</code> |
| which was established before migration will incorrectly imply that the role's enclosing team still is <code>previousTeam</code>, |
| which is no longer true after migration. |
| While this does not effect any method lookup (which is still safe), further assumptions based on a role's dependent type |
| are invalidated by team migration. The same holds for references from the migrating role to any sibling role instances.<br /> |
| If the rules of family polymorphism should be maintained one should just refrain from declaring <code>ITeamMigratable</code> |
| as a role's super-interface. |
| </div> |
| </dd> |
| </dl> |
| <p>For both methods the signature declared in the interface is over-generalized, yet the compiler performs the necessary checks |
| to |
| ensure that role, base and team instances are indeed compatible and additionally the return type of <code>migrateToTeam</code> |
| is checked as a self-type, i.e., it reflects the exact type of the call target. |
| </p> |
| </div> |
| </div> |
| <div class="sect depth2" id="s6.3"> |
| <h2 class="sect">§6.3 Annotations<a class="img" href="s6.html#s6.3" |
| title="PermaLink to §6.3 Annotations"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a><span class="toplink"><a href="#top">↑ §6</a></span></h2> |
| <div class="subsect depth3" id="s6.3.a"> |
| <h4 class="subsect">(a) <span class="title">Controlling implicit team activation</span><a class="img" href="s6.html#s6.3.a" |
| title="PermaLink to (a) Controlling implicit team activation"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>Implicit team activation is disabled by default and can be enabled by adding the annotation |
| <code>@org.objectteams.ImplicitTeamActivation</code>. |
| See <a href="s5.html#s5.3.d" |
| title="§5.3.(d) Configuring implicit activation" |
| class="sect">§5.3.(d)</a> for details. |
| |
| </p> |
| </div> |
| <div class="subsect depth3" id="s6.3.b"> |
| <h4 class="subsect">(b) <span class="title">Controlling lifting</span><a class="img" href="s6.html#s6.3.b" |
| title="PermaLink to (b) Controlling lifting"><img style="vertical-align:text-top;margin-left:5px;" src="../images/permalink.png" |
| alt="" /></a></h4> |
| <p>If lifting as defined in <a href="s2.html#s2.3" title="§2.3 Lifting" class="sect">§2.3</a> and specifically <a href="s2.html#s2.3.1" title="§2.3.1 Implicit role creation" |
| class="sect">§2.3.1</a> causes |
| performance problems, the semantics of lifting can be modified per role class using the annotation |
| <code>@org.objectteams.Instantiation</code>. |
| See <a href="s2.html#s2.3.1.d" |
| title="§2.3.1.(d) Fine-tuning role instantiation" |
| class="sect">§2.3.1.(d)</a> for details. |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| <table class="nav"> |
| <tr> |
| <td class="back"><a href="s5.html" rel="prev"><< §5 Team Activation</a></td> |
| <td class="top"><a href="index.html" rel="contents">↑ Table of Contents ↑</a></td> |
| <td class="next"><a href="s7.html" rel="next">§7 Role Encapsulation >></a></td> |
| </tr> |
| </table> |
| </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.1 — last modified: 2013-05-28 |
| </div> |
| </body> |
| </html> |