Prototype prototype = engine.core.app.getPrototypeByName(className);
ArrayList a = new ArrayList();
while (prototype != null) {
Resource[] resources = prototype.getResources();
for (int i = resources.length - 1; i >= 0; i--) {
Resource resource = resources[i];
if (resource.exists() && resource.getShortName().equals(resourceName))
a.add(Context.toObject(resource, core.global));
}
prototype = prototype.getParentPrototype();
}
return Context.getCurrentContext().newArray(core.global, a.toArray());