de.intarsys.tools.locator.MappedLocatorLookup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.locator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class MappedLocatorLookup extends AbstractLocatorLookup {
private Map locators = new HashMap();
public void addMap(String name, ILocator locator) {
locators.put(name, locator);
}
public ILocator createLocator(String location) throws IOException {
ILocator lookup = locators.get(location);
if (lookup != null) {
return lookup;
}
throw new FileNotFoundException("locator '" + location + "' not found");
}
public Map getMaps() {
return new HashMap(locators);
}
public void removeMap(String name) {
locators.remove(name);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy