Package rx.internal.util
Class PlatformDependent
- java.lang.Object
-
- rx.internal.util.PlatformDependent
-
public final class PlatformDependent extends java.lang.ObjectAllow platform dependent logic such as checks for Android. Modeled after Netty with some code copy/pasted from: https://github.com/netty/netty/blob/master/common/src/main/java/io/netty/util/internal/PlatformDependent.java
-
-
Field Summary
Fields Modifier and Type Field Description private static intANDROID_API_VERSIONstatic intANDROID_API_VERSION_IS_NOT_ANDROIDPossible value ofgetAndroidApiVersion()which means that the current platform is not Android.private static booleanIS_ANDROID
-
Constructor Summary
Constructors Modifier Constructor Description privatePlatformDependent()Utility class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetAndroidApiVersion()Returns version of Android API.(package private) static java.lang.ClassLoadergetSystemClassLoader()Return the systemClassLoader.static booleanisAndroid()Returnstrueif and only if the current platform is Android.private static intresolveAndroidApiVersion()Resolves version of Android API.
-
-
-
Field Detail
-
ANDROID_API_VERSION_IS_NOT_ANDROID
public static final int ANDROID_API_VERSION_IS_NOT_ANDROID
Possible value ofgetAndroidApiVersion()which means that the current platform is not Android.- See Also:
- Constant Field Values
-
ANDROID_API_VERSION
private static final int ANDROID_API_VERSION
-
IS_ANDROID
private static final boolean IS_ANDROID
-
-
Method Detail
-
isAndroid
public static boolean isAndroid()
Returnstrueif and only if the current platform is Android.- Returns:
trueif and only if the current platform is Android
-
getAndroidApiVersion
public static int getAndroidApiVersion()
Returns version of Android API.- Returns:
- version of Android API or
ANDROID_API_VERSION_IS_NOT_ANDROIDif version can not be resolved or if current platform is not Android.
-
resolveAndroidApiVersion
private static int resolveAndroidApiVersion()
Resolves version of Android API.- Returns:
- version of Android API or
ANDROID_API_VERSION_IS_NOT_ANDROIDif version can not be resolved or if the current platform is not Android. - See Also:
- Documentation
-
getSystemClassLoader
static java.lang.ClassLoader getSystemClassLoader()
Return the systemClassLoader.
-
-