Package com.google.common.truth
Class Platform
java.lang.Object
com.google.common.truth.Platform
Extracted routines that need to be swapped in for GWT, to allow for
minimal deltas between the GWT and non-GWT version.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addInterfaceNames
(Class<?>[] interfaces, Set<String> types) private static void
addTypeNames
(Class<?> clazz, Set<String> types) static AssertionError
comparisonFailure
(String message, String expected, String actual) static String
compressType
(String type) Inspired by JavaWriter.static boolean
isInstanceOfType
(Object instance, Class<?> clazz) Returns true if the instance is assignable to the type Clazz.(package private) static boolean
isInstanceOfTypeGWT
(Object instance, Class<?> clazz) Returns true if the instance is assignable to the type Clazz (suitable for a GWT environment).(package private) static boolean
isInstanceOfTypeJava
(Object instance, Class<?> clazz) Returns true if the instance is assignable to the type Clazz (suitable for a JVM environment).private static String
stripIfInPackage
(String type, String packagePrefix) private static String
stripIfPrefixed
(String string, String prefix) private static String
-
Field Details
-
TYPE_PATTERN
-
-
Constructor Details
-
Platform
private Platform()
-
-
Method Details
-
isInstanceOfType
Returns true if the instance is assignable to the type Clazz. -
isInstanceOfTypeJava
Returns true if the instance is assignable to the type Clazz (suitable for a JVM environment). -
isInstanceOfTypeGWT
Returns true if the instance is assignable to the type Clazz (suitable for a GWT environment). -
addInterfaceNames
-
addTypeNames
-
compressType
Inspired by JavaWriter. -
typeOnly
-
stripIfPrefixed
-
stripIfInPackage
-
comparisonFailure
-