本文整理了Java中de.huxhorn.sulky.version.YeOldeJavaVersion.parse()
方法的一些代码示例,展示了YeOldeJavaVersion.parse()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YeOldeJavaVersion.parse()
方法的具体详情如下:
包路径:de.huxhorn.sulky.version.YeOldeJavaVersion
类名称:YeOldeJavaVersion
方法名:parse
[英]Parses a Java version and returns the corresponding JavaVersion instance.
[中]解析Java版本并返回相应的JavaVersion实例。
代码示例来源:origin: de.huxhorn.sulky/de.huxhorn.sulky.version
/**
* Parses a Java version and returns the corresponding JavaVersion instance.
*
* @param versionString the String to be parsed
* @return the JavaVersion corresponding to the given versionString
* @throws java.lang.NullPointerException if versionString is null.
* @throws java.lang.IllegalArgumentException if versionString is invalid.
*/
public static JavaVersion parse(String versionString)
{
if(versionString == null)
{
throw new NullPointerException("versionString must not be null!");
}
if(versionString.startsWith("1."))
{
return YeOldeJavaVersion.parse(versionString);
}
return Jep223JavaVersion.parse(versionString);
}
代码示例来源:origin: huxi/sulky
/**
* Parses a Java version and returns the corresponding JavaVersion instance.
*
* @param versionString the String to be parsed
* @return the JavaVersion corresponding to the given versionString
* @throws java.lang.NullPointerException if versionString is null.
* @throws java.lang.IllegalArgumentException if versionString is invalid.
*/
public static JavaVersion parse(String versionString)
{
if(versionString == null)
{
throw new NullPointerException("versionString must not be null!");
}
if(versionString.startsWith("1."))
{
return YeOldeJavaVersion.parse(versionString);
}
return Jep223JavaVersion.parse(versionString);
}
内容来源于网络,如有侵权,请联系作者删除!