de.intarsys.tools.locator.RenamedLocator 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.IOException;
import de.intarsys.tools.file.FileTools;
public class RenamedLocator extends DelegatingLocator {
private String name;
public RenamedLocator(ILocator delegate) {
super(delegate);
this.name = delegate.getFullName();
}
public RenamedLocator(ILocator delegate, String fullName) {
super(delegate);
this.name = fullName;
}
@Override
public String getFullName() {
return name;
}
@Override
public String getLocalName() {
return FileTools.getBaseName(name);
}
@Override
public String getTypedName() {
return FileTools.getFileName(name);
}
@Override
public void rename(String newName) throws IOException {
this.name = newName;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy