Package com.google.common.truth
Class Platform
- java.lang.Object
-
- com.google.common.truth.Platform
-
public final class Platform extends java.lang.Object
Extracted routines that need to be swapped in for GWT, to allow for minimal deltas between the GWT and non-GWT version.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Platform()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
addTypeNames(java.lang.Class<?> clazz, java.util.Set<java.lang.String> types)
static java.lang.AssertionError
comparisonFailure(java.lang.String message, java.lang.String expected, java.lang.String actual)
static java.lang.String
compressType(java.lang.String type)
This is a no-op in GWT as it relies on matching.static boolean
isInstanceOfType(java.lang.Object instance, java.lang.Class<?> clazz)
Returns true if the instance is assignable to the type Clazz.(package private) static boolean
isInstanceOfTypeGWT(java.lang.Object instance, java.lang.Class<?> clazz)
Returns true if the instance is assignable to the type Clazz (though in GWT clazz can only be a concrete class that is an ancestor class of the instance or the direct type of the instance.
-
-
-
Method Detail
-
isInstanceOfType
public static boolean isInstanceOfType(java.lang.Object instance, java.lang.Class<?> clazz)
Returns true if the instance is assignable to the type Clazz.
-
isInstanceOfTypeGWT
static boolean isInstanceOfTypeGWT(java.lang.Object instance, java.lang.Class<?> clazz)
Returns true if the instance is assignable to the type Clazz (though in GWT clazz can only be a concrete class that is an ancestor class of the instance or the direct type of the instance.
-
addTypeNames
private static void addTypeNames(java.lang.Class<?> clazz, java.util.Set<java.lang.String> types)
-
compressType
public static java.lang.String compressType(java.lang.String type)
This is a no-op in GWT as it relies on matching.
-
comparisonFailure
public static java.lang.AssertionError comparisonFailure(java.lang.String message, java.lang.String expected, java.lang.String actual)
-
-