Java 5.0 code generation for slice2java

vsonnathivsonnathi Venkat RamanaOrganization: Amazon.comProject: PrototypeMember ✭✭
Hi,

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

Thanks,
--Venkat.

Comments

  • mesmes CaliforniaMark SpruiellOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff 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 CaliforniaMark SpruiellOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff 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.