本文整理了Java中com.thoughtworks.xstream.core.JVM.isAndroid()
方法的一些代码示例,展示了JVM.isAndroid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JVM.isAndroid()
方法的具体详情如下:
包路径:com.thoughtworks.xstream.core.JVM
类名称:JVM
方法名:isAndroid
暂无
代码示例来源:origin: com.thoughtworks.xstream/xstream
/**
* Parses the java version system property to determine the major java version, i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: x-stream/xstream
/**
* Parses the java version system property to determine the major java version, i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.7f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch (final NumberFormatException e) {
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8
/**
* Parses the java version system property to determine the major java version, i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: com.haulmont.thirdparty/xstream
/**
* Parses the java version system property to determine the major java version,
* i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: org.sonatype.nexus.xstream/xstream
/**
* Parses the java version system property to determine the major java version,
* i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream
/**
* Parses the java version system property to determine the major java version, i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Parses the java version system property to determine the major java version, i.e. 1.x
*
* @return A float of the form 1.x
*/
private static final float getMajorJavaVersion() {
try {
return isAndroid() ? 1.5f : Float.parseFloat(System.getProperty("java.specification.version"));
} catch ( NumberFormatException e ){
// Some JVMs may not conform to the x.y.z java.version format
return DEFAULT_JAVA_VERSION;
}
}
内容来源于网络,如有侵权,请联系作者删除!