Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
OT Bytecode Attributes/CallinRoleBaseBindings
Contents
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. A prefix "
^
" is used to denote if a base type is an interface (since 0.7.1, see bug 321440).