Results 1 to 3 of 3

Thread: slice2java compile issue

  1. #1
    danleepw is offline Registered User
    Name: Dan Lee
    Organization: Rumyour
    Project: Financial computing engine
    Join Date
    Jul 2009
    Posts
    17

    slice2java compile issue

    Hi,

    I am using ICE 3.4.0 slice2java to generate java class. When I put a metadata ["java:type:java.util.ArrayList"] for sequence, it will generate a xxxHelper.java which does not put correct type when "new" the arraylist in "pubic static read" method. So, could we improve the slice2java to put correct type for it? Thanks for your attention.

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,441
    Hi,

    Please have a look at this section of the manual. It explains that it is your responsibility to use the correct type in your custom type metadata because slice2java is simply copying the type name from your metadata into the generated code. For example:
    Code:
    // Slice
    ["java:type:java.util.ArrayList<String>"] sequence<string> StringSeq;
    If you are still having trouble, please post an example of the Slice code that is causing the problem.

    Regards,
    Mark

  3. #3
    danleepw is offline Registered User
    Name: Dan Lee
    Organization: Rumyour
    Project: Financial computing engine
    Join Date
    Jul 2009
    Posts
    17
    Hi Mes,

    Thanks for the reply. I suggest that slice2java compiler would add the type into the generated class since the compiler knows what type should be added from definition. Also, if we want to create a sequence of a user-Defined Type, we need to hard code the full class name in the slice language which is not so convenient when we make some changes on modules.

    Regards,
    Dan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 06-21-2010, 04:03 AM
  2. help with slice2java
    By lakshmiK in forum Help Center
    Replies: 12
    Last Post: 08-21-2008, 06:49 PM
  3. slice2java
    By ChenQingQing in forum Help Center
    Replies: 4
    Last Post: 09-25-2006, 03:20 AM
  4. Where is slice2java
    By dashie in forum Help Center
    Replies: 7
    Last Post: 09-04-2006, 06:21 AM
  5. slice2java
    By alexander in forum Bug Reports
    Replies: 6
    Last Post: 12-16-2003, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •