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/ReferencedTeams

< OT Bytecode Attributes
Revision as of 03:22, 7 April 2010 by Resix.cs.tu-berlin.de (Talk | contribs) (New page: =Attribute ReferencedTeams= ===Intent=== This attribute is used to store dependencies among classes in the byte code, such that the OTRE can load teams before their base classes. The Ref...)

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

Attribute ReferencedTeams

Intent

This attribute is used to store dependencies among classes in the byte code, such that the OTRE can load teams before their base classes.

The ReferencedTeams attribute is a variable-length attribute used in the attributes table of the ClassFile? structure.

Location:

An arbitrary class which references a Team. If a team extends another team the super team is also part of this attribute. Additionally every team is part of its own "ReferencedTeams" attribute.

Content:

A list of (fully qualified) team names.

Purpose:

The OTRE uses this attribute to load all teams and belonging roles and collect the contained binding attributes BEFORE the corresponding base classes are loaded. Thus the information about callins to be woven into the base code is known when a base class is loaded and transformed.

Format:

    ReferencedTeams {
     u2 attribute_name_index;
     u4 attribute_length;
     u2 referenced_team_count;
     ReferencedTeam referenced_teams[referenced_team_count];
    }
 
    ReferencedTeam {
     u2 referenced_team_index;
    }

The items of the ReferencedTeams structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "ReferencedTeams".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • referenced_team_count
The value of the referenced_team_count item indicates the number of entries in the referenced_teams array.
  • referenced_teams[]
Every team T referenced in the constant pool of this class has an entry in this array. Each referenced_teams array entry contains the following item:
  • referenced_team_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the fully qualified name of T, as given in the source code from which this class file was compiled.

Back to the top