@HashCodeAndEqualsPlugin.Enhance public static class ByteArrayClassLoader.PackageLookupStrategy.ForJava9CapableVm extends java.lang.Object implements ByteArrayClassLoader.PackageLookupStrategy
ByteArrayClassLoader.PackageLookupStrategy.CreationAction, ByteArrayClassLoader.PackageLookupStrategy.ForJava9CapableVm, ByteArrayClassLoader.PackageLookupStrategy.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
getDefinedPackage
The
java.lang.ClassLoader#getDefinedPackage(String) method. |
Modifier | Constructor and Description |
---|---|
protected |
ForJava9CapableVm(java.lang.reflect.Method getDefinedPackage)
Creates a new package lookup strategy for a modern VM.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Package |
apply(ByteArrayClassLoader classLoader,
java.lang.String name)
Returns a package for a given byte array class loader and a name.
|
private final java.lang.reflect.Method getDefinedPackage
java.lang.ClassLoader#getDefinedPackage(String)
method.protected ForJava9CapableVm(java.lang.reflect.Method getDefinedPackage)
getDefinedPackage
- The java.lang.ClassLoader#getDefinedPackage(String)
method.public java.lang.Package apply(ByteArrayClassLoader classLoader, java.lang.String name)
apply
in interface ByteArrayClassLoader.PackageLookupStrategy
classLoader
- The class loader to locate a package for.name
- The name of the package.null
if no such package exists.