Package rx.internal.util
Class PlatformDependent
java.lang.Object
rx.internal.util.PlatformDependent
Allow 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
FieldsModifier and TypeFieldDescriptionprivate static final int
static final int
Possible value ofgetAndroidApiVersion()
which means that the current platform is not Android.private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns version of Android API.(package private) static ClassLoader
Return the systemClassLoader
.static boolean
Returnstrue
if and only if the current platform is Android.private static int
Resolves version of Android API.
-
Field Details
-
ANDROID_API_VERSION_IS_NOT_ANDROID
public static final int ANDROID_API_VERSION_IS_NOT_ANDROIDPossible value ofgetAndroidApiVersion()
which means that the current platform is not Android.- See Also:
-
ANDROID_API_VERSION
private static final int ANDROID_API_VERSION -
IS_ANDROID
private static final boolean IS_ANDROID
-
-
Constructor Details
-
PlatformDependent
private PlatformDependent()Utility class.
-
-
Method Details
-
isAndroid
public static boolean isAndroid()Returnstrue
if and only if the current platform is Android.- Returns:
true
if 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_ANDROID
if 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_ANDROID
if version can not be resolved or if the current platform is not Android. - See Also:
-
getSystemClassLoader
Return the systemClassLoader
.
-