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;
- with Ada.Tags; use type Ada.Tags.Tag;
-
- with Flags;
-
- with Attribute.Constant_Value;
-
- package body Field.Variable is
-
- function Read_Field
- (From_File : Byte_Utilities.File_Type;
- Context : in CP.Acc_CP_Infos)
- return Acc_Field_Info is
- New_One : Acc_Field_Info;
- begin
- -- Creates the Variable_Info
- New_One := new Variable_Info;
-
- -- Decoding inside informations is done by the superclass
- Decode (From_File, New_One, Context);
- return New_One;
- end Read_Field;
-
- procedure Display_Java_Spec (Infos : access Variable_Info;
- Context : in CP.Acc_CP_Infos;
- For_Class : in Unsigned_16;
- For_Body : in Boolean) is
- begin
- Ada.Text_Io.Put (" ");
-
- -- displays the access rights of the variable or constant
- Flags.Display (Infos.Access_Flags, Flags.Variable_Flag);
-
- -- displays the variable or constant type and its name
- Ada.Text_Io.Put
- (CP.Java_Decoded_String
- (Context (Infos.Signature_Index),
- Context,
- CP.Variable_Signature) &
- " " &
- CP.Print_String (Context (Infos.Name_Index), Context));
-
- -- if there is a value, we display it
- if Infos.Attributes_Count > 0 then
- for I in 1 .. Infos.Attributes_Count loop
- if Infos.Attributes(I).all'Tag = Attribute.Constant_Value.Constant_Value_Attribute'Tag then
- Ada.Text_Io.Put (" = ");
- Attribute.Display (Infos.Attributes(I), Context);
- end if;
- end loop;
- end if;
- Ada.Text_Io.Put_Line (";");
- end Display_Java_Spec;
-
- procedure Display_Ada_Spec (Infos : access Variable_Info;
- Context : in CP.Acc_CP_Infos;
- For_Class : in Unsigned_16) is
- begin
- null;
- end Display_Ada_Spec;
-
- procedure Display_Java_Body (Infos : access Variable_Info;
- Context : in CP.Acc_CP_Infos;
- For_Class : in Unsigned_16) is
- begin
- null;
- end Display_Java_Body;
-
-
- procedure Display_Ada_Body (Infos : access Variable_Info;
- Context : in CP.Acc_CP_Infos;
- For_Class : in Unsigned_16) is
- begin
- null;
- end Display_Ada_Body;
-
- end Field.Variable;
-