* Implement getRepositories() method that returns an array containing the

prototype's repositories
* Some minor and/or cosmetic changes
This commit is contained in:
hns 2006-05-11 19:20:31 +00:00
parent 16046c5e71
commit 5c1714d855

View file

@ -207,6 +207,13 @@ public final class Prototype {
return resources; return resources;
} }
/**
* Returns an array of repositories containing code for this prototype.
*/
public Repository[] getRepositories() {
return (Repository[]) repositories.toArray(new Repository[repositories.size()]);
}
/** /**
* Get a checksum over this prototype's repositories. This tells us * Get a checksum over this prototype's repositories. This tells us
* if any resources were added or removed. * if any resources were added or removed.
@ -375,7 +382,7 @@ public final class Prototype {
/** /**
* Get a map containing this prototype's skins as strings * Get a map containing this prototype's skins as strings
* *
* @return * @return a scriptable skin map
*/ */
public Map getScriptableSkinMap() { public Map getScriptableSkinMap() {
return new ScriptableSkinMap(new SkinMap()); return new ScriptableSkinMap(new SkinMap());
@ -385,7 +392,7 @@ public final class Prototype {
* Get a map containing this prototype's skins as strings, overloaded by the * Get a map containing this prototype's skins as strings, overloaded by the
* skins found in the given skinpath. * skins found in the given skinpath.
* *
* @return * @return a scriptable skin map
*/ */
public Map getScriptableSkinMap(Object[] skinpath) { public Map getScriptableSkinMap(Object[] skinpath) {
return new ScriptableSkinMap(new SkinMap(skinpath)); return new ScriptableSkinMap(new SkinMap(skinpath));
@ -543,10 +550,10 @@ public final class Prototype {
} }
private void loadSkinFiles(String skinDir) { private void loadSkinFiles(String skinDir) {
File dir = new File(skinDir.toString(), Prototype.this.getName()); File dir = new File(skinDir, Prototype.this.getName());
// if directory does not exist use lower case property name // if directory does not exist use lower case property name
if (!dir.isDirectory()) { if (!dir.isDirectory()) {
dir = new File(skinDir.toString(), Prototype.this.getLowerCaseName()); dir = new File(skinDir, Prototype.this.getLowerCaseName());
if (!dir.isDirectory()) { if (!dir.isDirectory()) {
return; return;
} }