summaryrefslogtreecommitdiff
path: root/java/src/Ice/Util.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/Ice/Util.java')
-rw-r--r--java/src/Ice/Util.java37
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;
}