Java 5.0 code generation for slice2java

vsonnathivsonnathi Member Venkat RamanaOrganization: Amazon.comProject: Prototype ✭✭
Hi,

Is there a plan for enhancing slice2java to generate JAva 5.0 code? Especially using generics for Dictionary mapping.

Thanks,
--Venkat.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Venkat,

    We don't currently allow metadata on dictionaries, but you can already specify generic types for sequences. For example:
    ["java:type:java.util.ArrayList<int>"] sequence<int> IntSeq;
    
    The generated code compiles just fine with JDK 1.5.0.

    We'll look into adding metadata support for dictionaries.

    Take care,
    - Mark
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I'm resurrecting this old thread to announce that metadata is fully supported for dictionaries in Java as of Ice 3.0, and you can use it with generic types. For example:
    ["java:type:java.util.TreeMap<Integer, String>"]
    dictionary<int, string> IntStringMap;
    
    See the manual for more information on using metadata in Slice.

    Take care,
    - Mark
Sign In or Register to comment.