Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

OT Bytecode Attributes/ReferencedTeams

Attribute ReferencedTeams


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.


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.


A list of (fully qualified) team names.


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.


    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