home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cpnaanty.adb < prev    next >
Encoding:
Text File  |  1996-09-19  |  1002 b   |  36 lines

  1. with Ada.Text_Io;
  2.  
  3. package body CP.Name_And_Type is
  4.  
  5.    use Byte_Utilities;
  6.    
  7.    procedure Decode (From_File : Byte_Utilities.File_Type;
  8.                      Some_Info : access Name_And_Type) is
  9.    begin
  10.       Some_Info.Tag := C_Class_Tag;
  11.  
  12.       -- Reads the variable, constant or method index name
  13.       Read (From_File, Some_Info.Name_Index);
  14.       
  15.       -- Reads the signature index
  16.       Read (From_File, Some_Info.Signature_Index);
  17.    end Decode;
  18.  
  19.    procedure Display (Some_Info : access Name_And_Type;
  20.                       Context   : in Acc_CP_Infos) is
  21.    begin
  22.       -- displays the variable, constant or method name
  23.       -- and the object signature
  24.       -- (gets the names in the Constant Pool)
  25.       Ada.Text_Io.Put 
  26.          (Print_String
  27.              (Context (Some_Info.Name_Index), Context) & " " &
  28.           Java_Decoded_String
  29.              (Context (Some_Info.Signature_Index),
  30.               Context,
  31.               Method_Signature));
  32.    end Display;
  33.  
  34.   
  35. end CP.Name_And_Type;
  36.