Archived

This forum has been archived. Please start a new discussion on GitHub.

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

Comments

  • mes
    mes California
    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:
    ["java:type:java.util.LinkedList<Integer>:java.util.LinkedList<Integer>"]
    sequence<int> IntArray;
    
    Regards,
    Mark
  • 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.