home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / cpnaanty.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  1.9 KB  |  61 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 Name_And_Type :
  18. -- a constant pool Name_And_Type information is used to represent a field
  19. -- (a variable or a constant) or a 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.Name_And_Type is
  31.  
  32.    -- the class Tag value in Java files
  33.    ------------------------------------
  34.    C_Class_Tag : constant Unsigned_8 := 12;
  35.  
  36.    type Name_And_Type is new CP_Info with private;
  37.       
  38.    type Acc_Name_And_Type is access all Name_And_Type'Class;
  39.    
  40.    -- Decode a Constant Pool information
  41.    -------------------------------------
  42.    procedure Decode (From_File : Byte_Utilities.File_Type;
  43.                      Some_Info : access Name_And_Type);
  44.  
  45.    -- Display a Constant Pool information
  46.    --------------------------------------
  47.    procedure Display (Some_Info : access Name_And_Type;
  48.                       Context   : in Acc_CP_Infos);
  49.  
  50. private
  51.  
  52.    -- adds indexes for the name and the signature of the constant
  53.    --------------------------------------------------------------
  54.    type Name_And_Type is new CP_Info with
  55.       record
  56.          Name_Index      : Unsigned_16;
  57.          Signature_Index : Unsigned_16;
  58.       end record;
  59.    
  60. end CP.Name_And_Type;
  61.