home *** CD-ROM | disk | FTP | other *** search
- --
- -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
- -- Author: Gilles Demailly
- --
- --
- -- Permission to use, copy, modify, and distribute this software and its
- -- documentation for any purpose and without fee is hereby granted,
- -- provided that the above copyright and authorship notice appear in all
- -- copies and that both that copyright notice and this permission notice
- -- appear in supporting documentation.
- --
- -- The ARA makes no representations about the suitability of this software
- -- for any purpose. It is provided "as is" without express
- -- or implied warranty.
- --
-
- with Ada.Text_Io;
-
- package body Attribute.Exceptions is
-
- use Byte_Utilities;
-
- procedure Decode (This : access Exceptions_Attribute;
- From_File : in Byte_Utilities.File_Type;
- Context : in CP.Acc_CP_Infos) is
- begin
- -- reads the number of exceptions contained in the table
- Read (From_File, This.Number_Of_Exceptions);
- if This.Number_Of_Exceptions > 0 then
-
- -- exception table allocation
- This.Exception_Index_Table :=
- new Index_Table (1..This.Number_Of_Exceptions);
-
- -- reads the exception indexes
- for I in 1..This.Number_Of_Exceptions loop
- Read (From_File, This.Exception_Index_Table (I));
- end loop;
- else
- This.Exception_Index_Table := null;
- end if;
- end Decode;
-
- procedure Display (This : access Exceptions_Attribute;
- Context : in CP.Acc_CP_Infos) is
- begin
- -- displays the names of the exceptions
- for I in 1 .. This.Number_Of_Exceptions loop
- if I > 1 then
- Ada.Text_Io.Put (", ");
- end if;
- Ada.Text_Io.Put
- (CP.Java_Decoded_String
- (Context (This.Exception_Index_Table (I)),
- Context,
- CP.Class_Name));
- end loop;
- end Display;
-
- end Attribute.Exceptions;
-