Package io.sentry.util
Class LoadClass
java.lang.Object
io.sentry.util.LoadClass
An Adapter for making Class.forName testable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isClassAvailable
(@NotNull String clazz, @Nullable ILogger logger) boolean
isClassAvailable
(@NotNull String clazz, @Nullable SentryOptions options) @Nullable Class<?>
Try to load a class via reflection
-
Constructor Details
-
LoadClass
public LoadClass()
-
-
Method Details
-
loadClass
@Nullable public @Nullable Class<?> loadClass(@NotNull @NotNull String clazz, @Nullable @Nullable ILogger logger) Try to load a class via reflection- Parameters:
clazz
- the full class namelogger
- an instance of ILogger- Returns:
- a Class<?> if it's available, or null
-
isClassAvailable
-
isClassAvailable
public boolean isClassAvailable(@NotNull @NotNull String clazz, @Nullable @Nullable SentryOptions options)
-