Results 1 to 3 of 3

Thread: A question on java metadata directive

  1. #1
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181

    A question on java metadata directive

    Hi, There,
    I have a simple slice definition:

    ["java:type:java.util.LinkedList"]
    sequence<int> IntArray;


    But I get mapping like this : java.util.List<java.lang.Integer>.


    I missed something?


    Thanks in advance.
    OrNot
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  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,445
    As described in 10.16.2, the metadata syntax allows you to specify both the instance type and the formal type. The instance type is what Ice will instantiate when it receives a value of the given type; the formal type is what appears in all generated APIs.

    If you want the generated code to require a LinkedList<Integer>, you will need to specify metadata like this:

    Code:
    ["java:type:java.util.LinkedList<Integer>:java.util.LinkedList<Integer>"]
    sequence<int> IntArray;
    Regards,
    Mark

  3. #3
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    Thanks,Mes, that's what I want.

    I will read the doc carefully again.


    BTW: It'd better to provide a GUI option to enable the underscore in Visual studio plugin to keep consistence with eclipse plugin.
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. package metadata directive - ClassCast Exception
    By vsonnathi in forum Bug Reports
    Replies: 3
    Last Post: 12-29-2009, 07:39 PM
  2. Replies: 0
    Last Post: 03-12-2009, 10:31 AM
  3. Question about the Java code
    By aozarov in forum Help Center
    Replies: 7
    Last Post: 05-20-2008, 04:00 AM
  4. Java global package metadata and builtin datatypes
    By mefoster in forum Bug Reports
    Replies: 1
    Last Post: 05-11-2007, 11:27 AM
  5. c++ metadata
    By sylvain in forum Help Center
    Replies: 5
    Last Post: 08-06-2003, 09:10 AM

Posting Permissions

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