diff options
author | Mark Spruiell <mes@zeroc.com> | 2001-12-15 22:14:32 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2001-12-15 22:14:32 +0000 |
commit | 0d636760d254ab9ecec94338ad2a753ffcc85f80 (patch) | |
tree | 9aeaed871191b8bab59cab524b62360c5fb70d6d /java/src/Ice/Util.java | |
parent | fixes (diff) | |
download | ice-0d636760d254ab9ecec94338ad2a753ffcc85f80.tar.bz2 ice-0d636760d254ab9ecec94338ad2a753ffcc85f80.tar.xz ice-0d636760d254ab9ecec94338ad2a753ffcc85f80.zip |
porting stable_30
Diffstat (limited to 'java/src/Ice/Util.java')
-rw-r--r-- | java/src/Ice/Util.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/java/src/Ice/Util.java b/java/src/Ice/Util.java index d9e8abfe5fa..58c970bd331 100644 --- a/java/src/Ice/Util.java +++ b/java/src/Ice/Util.java @@ -46,5 +46,42 @@ public final class Util return new CommunicatorI(properties); } + public static void + addArgumentPrefix(String prefix) + { + PropertiesI.addArgumentPrefix(prefix); + } + + public static Identity + stringToIdentity(String s) + { + Identity ident = new Identity(); + int pos = s.indexOf('#'); + if (pos != -1) + { + ident.category = s.substring(0, pos); + ident.name = s.substring(pos + 1); + } + else + { + ident.category = ""; + ident.name = s; + } + return ident; + } + + public static String + identityToString(Identity ident) + { + if (ident.category.length() == 0) + { + return ident.name; + } + else + { + return ident.category + '#' + ident.name; + } + } + private static Properties _defaultProperties = null; } |