From 33cf48e979089389e38355babc31f0741caba518 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 23 Oct 2007 15:36:45 +0000 Subject: [PATCH] added new constructor to build from class hints git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1112 9efc2488-bf62-4759-914b-345cdb29e865 --- src/java/org/opensrf/util/OSRFObject.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/java/org/opensrf/util/OSRFObject.java b/src/java/org/opensrf/util/OSRFObject.java index 1050706..af28f4a 100644 --- a/src/java/org/opensrf/util/OSRFObject.java +++ b/src/java/org/opensrf/util/OSRFObject.java @@ -16,6 +16,7 @@ public class OSRFObject extends HashMap implements OSRFSerializa public OSRFObject() { } + /** * Creates a new object with the provided registry */ @@ -24,6 +25,15 @@ public class OSRFObject extends HashMap implements OSRFSerializa registry = reg; } + + /** + * Creates a new OpenSRF object based on the net class string + * */ + public OSRFObject(String netClass) { + this(OSRFRegistry.getRegistry(netClass)); + } + + /** * @return This object's registry */ -- 2.11.0