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.
- --
-
- -- This child package provides the class Ref_Info :
- -- a constant pool Ref_Info information is used to represent a field
- -- (variable or constant), a method or an interface method.
- --
- -- For more information about Java Class file format check :
- -- The Java Virtual Machine Specification
- -- (Release 1.0 Beta - Draft - August 21, 1995)
-
- with Basic_Definitions;
- use Basic_Definitions;
-
- with Byte_Utilities;
-
- package CP.Ref_Info is
-
- -- the class Tag values in Java files
- -- (currently this class implements three different
- -- compatible structures of a Java Class file. It
- -- should be in the future a common superclass of
- -- three classes if we need to add specific behavior)
- ------------------------------------------------------
- C_Class_Tag : constant Unsigned_8 := 9;
- C_Class_Tag1 : constant Unsigned_8 := 10;
- C_Class_Tag2 : constant Unsigned_8 := 11;
-
- type Ref_Info is new CP_Info with private;
-
- type Acc_Ref_Info is access all Ref_Info'Class;
-
- -- Decode a Constant Pool information
- -------------------------------------
- procedure Decode (From_File : Byte_Utilities.File_Type;
- Some_Info : access Ref_Info);
-
- -- Display a Constant Pool information
- --------------------------------------
- procedure Display (Some_Info : access Ref_Info;
- Context : in Acc_CP_Infos);
-
- private
-
- -- adds the class index and the Name_And_Type index of
- -- the referenced object in the Constant Pool table
- ------------------------------------------------------
- type Ref_Info is new CP_Info with
- record
- Class_Index : Unsigned_16;
- Name_And_Type_Index : Unsigned_16;
- end record;
-
- end CP.Ref_Info;
-