home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cprefinf.adb < prev    next >
Encoding:
Text File  |  1996-09-19  |  1.5 KB  |  48 lines

  1. --
  2. -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
  3. -- Author: Gilles Demailly
  4. --
  5. --
  6. -- Permission to use, copy, modify, and distribute this software and its
  7. -- documentation for any purpose and without fee is hereby granted,
  8. -- provided that the above copyright and authorship notice appear in all
  9. -- copies and that both that copyright notice and this permission notice
  10. -- appear in supporting documentation.
  11. -- 
  12. -- The ARA makes no representations about the suitability of this software
  13. -- for any purpose.  It is provided "as is" without express
  14. -- or implied warranty.
  15. -- 
  16.  
  17. with Ada.Text_Io;
  18.  
  19. package body CP.Ref_Info is
  20.  
  21.    use Byte_Utilities;
  22.    
  23.    procedure Decode (From_File : Byte_Utilities.File_Type;
  24.                      Some_Info : access Ref_Info) is
  25.    begin
  26.       -- should be corrected in the future
  27.       Some_Info.Tag := C_Class_Tag;
  28.       
  29.       -- reads class and Name_And_Type indexes in the Constant Pool
  30.       Read (From_File, Some_Info.Class_Index);
  31.       Read (From_File, Some_Info.Name_And_Type_Index);
  32.    end Decode;
  33.  
  34.    procedure Display (Some_Info : access Ref_Info;
  35.                       Context   : Acc_CP_Infos) is
  36.    begin
  37.       -- display the class (or interface) name, the object name
  38.       -- and its signature 
  39.       Ada.Text_Io.Put
  40.          (Java_Decoded_String
  41.              (Context (Some_Info.Class_Index),
  42.               Context, 
  43.               Class_Name) & ".");
  44.       Display (Context (Some_Info.Name_And_Type_Index), Context);
  45.    end Display;
  46.    
  47. end CP.Ref_Info;
  48.