@HashCodeAndEqualsPlugin.Enhance public static class PackageDefinitionStrategy.ManifestReading.SealBaseLocator.ForTypeResourceUrl extends Object implements PackageDefinitionStrategy.ManifestReading.SealBaseLocator
URLClassLoader
, i.e. tries
to deduct the base from a class's resource URL.PackageDefinitionStrategy.ManifestReading.SealBaseLocator.ForFixedValue, PackageDefinitionStrategy.ManifestReading.SealBaseLocator.ForTypeResourceUrl, PackageDefinitionStrategy.ManifestReading.SealBaseLocator.NonSealing
Constructor and Description |
---|
ForTypeResourceUrl()
Creates a new seal base locator that attempts deduction from a type's URL while using a
PackageDefinitionStrategy.ManifestReading.SealBaseLocator.NonSealing seal base locator
as a fallback. |
ForTypeResourceUrl(PackageDefinitionStrategy.ManifestReading.SealBaseLocator fallback)
Creates a new seal base locator that attempts deduction from a type's URL.
|
Modifier and Type | Method and Description |
---|---|
URL |
findSealBase(ClassLoader classLoader,
String typeName)
Locates the URL that should be used for sealing a package.
|
public ForTypeResourceUrl()
PackageDefinitionStrategy.ManifestReading.SealBaseLocator.NonSealing
seal base locator
as a fallback.public ForTypeResourceUrl(PackageDefinitionStrategy.ManifestReading.SealBaseLocator fallback)
fallback
- The seal base locator to fallback to when a resource is not found or an unexpected URL protocol is discovered.@MaybeNull public URL findSealBase(ClassLoader classLoader, String typeName)
findSealBase
in interface PackageDefinitionStrategy.ManifestReading.SealBaseLocator
classLoader
- The class loader loading the package.typeName
- The name of the type being loaded that triggered the package definition.null
if the package should not be sealed.Copyright © 2014–2023. All rights reserved.