From: erickson Date: Tue, 23 Oct 2007 15:36:45 +0000 (+0000) Subject: added new constructor to build from class hints X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=33cf48e979089389e38355babc31f0741caba518;p=opensrf%2Fbjwebb.git added new constructor to build from class hints git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1112 9efc2488-bf62-4759-914b-345cdb29e865 --- 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 */