Results 1 to 3 of 3

Thread: Controling Java Slice package names.

  1. #1
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34

    Controling Java Slice package names.

    Hi,

    I have the following:

    Code:
    #ifndef INVOKE_ICE
    #define INVOKE_ICE
    
    #include <Ice/Identity.ice>
    
    module SuperServiceObjects
    {
     ...
    };
    Running Slice2java I get in one of my source files:

    Code:
    // Ice version 3.3.0
    
    package SuperServiceObjects;
    
    public final class IntDictHolder
    {
        public
        IntDictHolder()
        {
        }
    
        public
        IntDictHolder(java.util.Map<java.lang.String, java.lang.Integer> value)
        {
            this.value = value;
        }
    
        public java.util.Map<java.lang.String, java.lang.Integer> value;
    }
    My question is how do I control the package to which the Java code belongs?
    i.e if I wanted package com.observatory.dome.SuperServiceObjects
    thus:


    Code:
    // Ice version 3.3.0
    
    package com.observatory.dome.SuperServiceObjects;
    
    public final class IntDictHolder
    {
        public
        IntDictHolder()
        {
        }
    
        public
        IntDictHolder(java.util.Map<java.lang.String, java.lang.Integer> value)
        {
            this.value = value;
        }
    
        public java.util.Map<java.lang.String, java.lang.Integer> value;
    }
    If this is a basic question forgive me. I tried putting the module in nested namespaces but the slice compiler didn't seem to like that...

    Thanks,
    Vince

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Take a look at http://www.zeroc.com/doc/Ice-3.3.0/m...ava.11.15.html. That should do what you want.

  3. #3
    vincei's Avatar
    vincei is offline Registered User
    Name: Vincent Ibeachum
    Organization: Sherman Observatory
    Project: Remote Observatory Control
    Join Date
    Jul 2007
    Posts
    34
    Thanks, Matthew. That appears to be exactly what I want.

    Cheers!
    Vince

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Java global package metadata and builtin datatypes
    By mefoster in forum Bug Reports
    Replies: 1
    Last Post: 05-11-2007, 11:27 AM
  2. Replies: 4
    Last Post: 08-23-2006, 09:33 PM
  3. Using underscores in Slice variable names.
    By ctennis in forum Help Center
    Replies: 2
    Last Post: 04-18-2006, 01:17 PM
  4. Replies: 1
    Last Post: 11-08-2004, 07:02 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
  •