-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
pragma Extensions_Allowed (On);
with Java; use Java;
with java.lang.Object;
with type java.lang.String.Typ is tagged;

package J is
   pragma Preelaborate;
   
   -----------------------
   -- Type Declarations --
   -----------------------
   
   type Typ;
   type Ref is access all Typ'Class;
   
   type Arr_Obj is array (Natural range <>) of Ref;
   type Arr     is access all Arr_Obj;
   
   type Arr_2_Obj is array (Natural range <>) of Arr;
   type Arr_2     is access all Arr_2_Obj;
   
   type Arr_3_Obj is array (Natural range <>) of Arr_2;
   type Arr_3     is access all Arr_3_Obj;
   
   type Typ is new java.lang.Object.Typ 
      with null record;
   
   ------------------------------
   -- Constructor Declarations --
   ------------------------------
   
   function new_J (This : Ref := null)
                   return Ref;
   
   -------------------------
   -- Method Declarations --
   -------------------------
   
   procedure doit (This : access Typ; 
                   P1_Int : Java.Int; 
                   P2_String : access java.lang.String.Typ'Class);
   
private

   pragma Convention (Java, Typ);
   pragma Java_Constructor (new_J);
   pragma Import (Java, doit, "doit");
   
end J;
pragma Import (Java, J, "J");
pragma Extensions_Allowed (Off);
