Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

OT Bytecode Attributes/CallinRoleBaseBindings

< OT Bytecode Attributes
Revision as of 14:54, 4 March 2010 by Stephan.cs.tu-berlin.de (Talk | contribs) (New page: =Attribute CallinRoleBaseBindings= ===Intent=== Using this attribute each team stores a list of all its roles that require weaving by the OTRE. Originally this affected only bound roles, ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Attribute CallinRoleBaseBindings

Intent

Using this attribute each team stores a list of all its roles that require weaving by the OTRE. Originally this affected only bound roles, but unbound roles with one or more callin methods are affected, too.

The CallinRoleBaseBindings attribute is a variable-length attribute used in the attributes table of the ClassFile? structure. It contains a list of pairs (rolename x basename).

Location:

A team class containing a role class bound by 'playedBy' in this team or in any super team (this attribute is copied into every sub team).

Content:

A list of pairs of role class names and base class names. As a special case the name <none> is used instead of a valid base class name. Using <none> also unbound roles can be mentioned in this attribute, which serves the purpose to tell the OTRE that this role requires weaving, too.

Purpose:

The OTRE uses this attribute to ensure, that all bound roles of a team are loaded next (prior to the base classes).

The binding information (role <-> base) is stored and used for later transformations.

Format:

    CallinRoleBaseBindings {
        u2 attribute_name_index;
        u4 attribute_length;
        u2 callin_bindings_count;
        CallinBinding callin_bindings[callin_bindings_count];
    }
  
    CallinBinding {
        u2 role_name_index;
        u2 base_name_index;
    }

The items of the CallinRoleBaseBindings structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "CallinRoleBaseBindings".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • callin_bindings_count
The value of the callin_bindings_count item indicates the number of entries in the callin_bindings array.
  • callin_bindings[]
For every role R of this (team) class bound to a base class B a pair is contained in this array. Each callin_bindings array entry contains the following two items:
  • role_name_index:
The constant_pool index representing the fully qualified name of R (as given in the source code from which this class file was compiled).
  • base_name_index
The constant_pool index representing the fully qualified name of B, as given in the source code from which this class file was compiled, or the special value <none> for unbound roles that still require weaving.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.