
morfologik.tools.CustomParameterConverters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of morfologik-tools Show documentation
Show all versions of morfologik-tools Show documentation
Morfologik Command Line Tools
package morfologik.tools;
import java.nio.file.Path;
import java.nio.file.Paths;
import com.beust.jcommander.IStringConverter;
import com.beust.jcommander.IStringConverterFactory;
class CustomParameterConverters implements IStringConverterFactory {
public static class PathConverter implements IStringConverter {
@Override
public Path convert(String value) {
return Paths.get(value);
}
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Class extends IStringConverter> getConverter(Class forType) {
if (forType.equals(Path.class)) {
return (Class) PathConverter.class;
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy