home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cprefinf.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.3 KB  |  68 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. -- This child package provides the class Ref_Info :
  18. -- a constant pool Ref_Info information is used to represent a field
  19. -- (variable or constant), a method or an interface method.
  20. --
  21. -- For more information about Java Class file format check :
  22. --    The Java Virtual Machine Specification
  23. --    (Release 1.0 Beta - Draft - August 21, 1995)
  24.  
  25. with Basic_Definitions;
  26. use Basic_Definitions;
  27.  
  28. with Byte_Utilities;
  29.  
  30. package CP.Ref_Info is
  31.  
  32.    -- the class Tag values in Java files
  33.    -- (currently this class implements three different
  34.    --  compatible structures of a Java Class file. It
  35.    --  should be in the future a common superclass of
  36.    --  three classes if we need to add specific behavior)
  37.    ------------------------------------------------------
  38.    C_Class_Tag  : constant Unsigned_8 := 9;
  39.    C_Class_Tag1 : constant Unsigned_8 := 10;
  40.    C_Class_Tag2 : constant Unsigned_8 := 11;
  41.  
  42.    type Ref_Info is new CP_Info with private;
  43.       
  44.    type Acc_Ref_Info is access all Ref_Info'Class;
  45.    
  46.    -- Decode a Constant Pool information
  47.    -------------------------------------
  48.    procedure Decode (From_File : Byte_Utilities.File_Type;
  49.                      Some_Info : access Ref_Info);
  50.  
  51.    -- Display a Constant Pool information
  52.    --------------------------------------
  53.    procedure Display (Some_Info : access Ref_Info;
  54.                       Context   : in Acc_CP_Infos);
  55.    
  56. private
  57.  
  58.    -- adds the class index and the Name_And_Type index of
  59.    -- the referenced object in the Constant Pool table
  60.    ------------------------------------------------------
  61.    type Ref_Info is new CP_Info with
  62.       record
  63.          Class_Index         : Unsigned_16;
  64.          Name_And_Type_Index : Unsigned_16;
  65.       end record;
  66.       
  67. end CP.Ref_Info;
  68.