Package org.polyfrost.oneconfig.utils.v1
Class LogScanner
java.lang.Object
org.polyfrost.oneconfig.utils.v1.LogScanner
Adapted from NotEnoughCrashes under the MIT License
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> Attempt to get the caller from a given stacktrace.static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromClass(Class<?> clazz) Return a set of ActiveMods that have been associated with the given class.static Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromClass(String className) static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> Return a set of ActiveMods that have been blamed for the given stacktrace.
-
Method Details
-
identifyFromStacktrace
@NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromStacktrace(Throwable e) Return a set of ActiveMods that have been blamed for the given stacktrace. This will be an empty set if no mods are blamed.- Parameters:
e- The throwable to scan- Returns:
- A set of mods that are blamed for the given stacktrace
-
identifyCallerFromStacktrace
@NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyCallerFromStacktrace(Throwable e) Attempt to get the caller from a given stacktrace.- Returns:
- A singleton mod set that contains the caller, or an empty set if no caller is found.
-
identifyFromClass
-
identifyFromClass
@NotNull public static @NotNull Set<org.polyfrost.oneconfig.api.platform.v1.ModInfo> identifyFromClass(Class<?> clazz) Return a set of ActiveMods that have been associated with the given class.- Parameters:
clazz- The class to scan- Returns:
- A set of mods that are associated with the given class
-