From a8359efde901bf8038e34daa9164c2b6cb9f1226 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 20 Nov 2001 00:23:32 +0000 Subject: [PATCH] Provide the ability to obtain named resource sets. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@626 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/resource/ResourceManager.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index 1c9ad5112..082fdf14d 100644 --- a/src/java/com/threerings/resource/ResourceManager.java +++ b/src/java/com/threerings/resource/ResourceManager.java @@ -1,5 +1,5 @@ // -// $Id: ResourceManager.java,v 1.3 2001/11/20 00:21:41 mdb Exp $ +// $Id: ResourceManager.java,v 1.4 2001/11/20 00:23:32 mdb Exp $ package com.threerings.resource; @@ -265,6 +265,18 @@ public class ResourceManager throw new FileNotFoundException(errmsg); } + /** + * Returns a reference to the resource set with the specified name, or + * null if no set exists with that name. Services that wish to load + * their own resources can allow the resource manager to load up a + * resource set for them, from which they can easily load their + * resources. + */ + public ResourceBundle[] getResourceSet (String name) + { + return (ResourceBundle[])_sets.get(name); + } + /** The classloader we use for classpath-based resource loading. */ protected ClassLoader _loader;