home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / attrexce.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.2 KB  |  70 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.  
  18. -- This child package provides the class Exceptions_Attribute :
  19. --  this attributes stores the exceptions a method may throw.
  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. with CP;
  31.  
  32. package Attribute.Exceptions is
  33.  
  34.    -- This class attribute name in Java files
  35.    ------------------------------------------
  36.    C_Class_Name : constant Wide_String := "Exceptions";
  37.  
  38.    type Exceptions_Attribute is new Attribute with private;
  39.       
  40.    type Acc_Exceptions_Attribute is access all Exceptions_Attribute'Class;
  41.      
  42.    -- Decode informations of the attribute from a file
  43.    ---------------------------------------------------
  44.    procedure Decode (This      : access Exceptions_Attribute;
  45.                      From_File : in Byte_Utilities.File_Type;
  46.                      Context   : in CP.Acc_CP_Infos);
  47.  
  48.    -- Display the attribute
  49.    ------------------------
  50.    procedure Display (This    : access Exceptions_Attribute;
  51.                       Context : in CP.Acc_CP_Infos);
  52.  
  53. private
  54.  
  55.    -- array of exception indexes in the constant pool array
  56.    --------------------------------------------------------
  57.    type Index_Table is array (Unsigned_16 range <>) of Unsigned_16;
  58.  
  59.    type Acc_Index_Table is access Index_Table;
  60.  
  61.    -- adds the table of exception indexes
  62.    --------------------------------------
  63.    type Exceptions_Attribute is new Attribute with
  64.       record
  65.          Number_Of_Exceptions  : Unsigned_16;
  66.          Exception_Index_Table : Acc_Index_Table;
  67.       end record;
  68.  
  69. end Attribute.Exceptions;
  70.