All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.intarsys.tools.locator.LocatorBasedLookup Maven / Gradle / Ivy

There is a newer version: 4.11
Show newest version
package de.intarsys.tools.locator;

import java.io.FileNotFoundException;
import java.io.IOException;

public class LocatorBasedLookup extends AbstractLocatorLookup {

	final private ILocator locator;

	public LocatorBasedLookup(ILocator locator) {
		super();
		this.locator = locator;
	}

	public ILocator createLocator(String location) throws IOException {
		ILocator lookup = getLocator().getChild(location);
		if (lookup.exists()) {
			return lookup;
		}
		throw new FileNotFoundException("locator '" + location + "' not found");
	}

	public ILocator getLocator() {
		return locator;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy