Class ClassLoadReport
java.lang.Object
de.tomatengames.util.ClassLoadReport
A ClassLoadReport captures the results of attempting to load various classes,
including both successful loads and failures.
- Since:
- 1.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA ClassLoadError represents a failed class loading attempt. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(ClassLoadReport other) Merges anotherClassLoadReportinto this report by adding all its results to thisClassLoadReport.voidaddFailedClass(String className, Throwable error) Adds information about a failed class load attempt to the report.voidaddLoadedClass(Class<?> cls) Adds a successfully loaded class to the report.Returns a list of all failed class load attempts.Returns a map of the failed class load attempts where the key is the class name and the value is the correspondingThrowableerror.Returns a list of all successfully loaded classes.
-
Constructor Details
-
ClassLoadReport
public ClassLoadReport()Constructs a new, emptyClassLoadReport.
-
-
Method Details
-
addLoadedClass
Adds a successfully loaded class to the report.- Parameters:
cls- the class that was loaded
-
addFailedClass
-
getLoadedClasses
-
getFailedClasses
Returns a list of all failed class load attempts.- Returns:
- a list of
ClassLoadErrorobjects representing the failed loads
-
getFailedClassesMap
-
addAll
Merges anotherClassLoadReportinto this report by adding all its results to thisClassLoadReport.- Parameters:
other- the otherClassLoadReportto merge
-