Skip to main content
Jump to: navigation, search

Difference between revisions of "OT Bytecode Attributes/PlayedBy"

(Format:)
(Purpose:)
 
Line 13: Line 13:
  
 
===Purpose:===
 
===Purpose:===
The OTRE does not use this attribute at the moment(?).
+
The OTRE records the baseclass name from this attribute in order to associate it with [[../CallinMethodMappings]] being read after this attribute.
 +
 
 +
Also for each class with a <tt>PlayedBy</tt> attribute the superclass relationship is recorded, which is important for inheritance of method bindings.
  
 
===Format:===
 
===Format:===

Latest revision as of 06:49, 3 July 2010

Attribute PlayedBy

Intent

This attribute stores the base class a role class is bound to.

The PlayedBy attribute is a fixed-length attribute used in the attributes table of the ClassFile structure.

Location:

A role class which, or which super role class, is bound to a base class.

Content:

The name of the bound base class.

Purpose:

The OTRE records the baseclass name from this attribute in order to associate it with OT Bytecode Attributes/CallinMethodMappings being read after this attribute.

Also for each class with a PlayedBy attribute the superclass relationship is recorded, which is important for inheritance of method bindings.

Format:

    PlayedBy {
     u2 attribute_name_index;
     u4 attribute_length;
     u2 base_class_name_index;
    }

The items of the PlayedBy structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "PlayedBy".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • base_class_name_index
The constant_pool index representing the fully qualified name of the base class, as given in the source code from which this class file was compiled.

Back to the top