The LibJ Lang library provides supplementary utilities for classes that belong to java.lang
, or are considered essential as to justify existence in java.lang
.
- AnnotationParameterException: Thrown to indicate an exception in a parameter value of an annotation.
- IllegalAnnotationException: Thrown to indicate that an illegal annotation was encountered.
- OperatingSystem: Enum representing the host operating system of the java runtime.
- PackageLoader: The
PackageLoader
is a class used to discover and load classes in a package. Given a package name, thePackageLoader
should attempt to locate and/or load the classes of the package. ThePackageLoader
uses aClassLoader
, either specified or default, for the discovery of packages and loading of classes. - PackageNotFoundException: Thrown when an application tries to load in a package using
PackageLoader
, but no definition for the specified package could be found.
The PackageLoader
is a class used to discover and load classes in a package. Given a package name, the PackageLoader
should attempt to locate and/or load the classes of the package. The PackageLoader
uses a ClassLoader
, either specified or default, for the discovery of packages and loading of classes.
The following example illustrates how to load the classes in the org.junit.runner
package, and to initialize classes whose name starts with org.junit.runner.Filter
.
PackageLoader.getContextPackageLoader().loadPackage("org.junit.runner", c -> c.getName().startsWith("org.junit.runner.Filter"));
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This project is licensed under the MIT License - see the LICENSE.txt file for details.