Package net.bytebuddy.dynamic.loading
Class PackageDefinitionStrategy.Definition.Simple
java.lang.Object
net.bytebuddy.dynamic.loading.PackageDefinitionStrategy.Definition.Simple
- All Implemented Interfaces:
PackageDefinitionStrategy.Definition
- Enclosing interface:
- PackageDefinitionStrategy.Definition
public static class PackageDefinitionStrategy.Definition.Simple
extends Object
implements PackageDefinitionStrategy.Definition
A simple package definition where any property is represented by a value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.PackageDefinitionStrategy.Definition
PackageDefinitionStrategy.Definition.Simple, PackageDefinitionStrategy.Definition.Trivial, PackageDefinitionStrategy.Definition.Undefined
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The package implementation's title ornull
if no such title exists.private final String
The package implementation's vendor ornull
if no such vendor exists.private final String
The package implementation's version ornull
if no such version exists.protected final URL
The seal base ornull
if the package is not sealed.private final String
The package specification's title ornull
if no such title exists.private final String
The package specification's vendor ornull
if no such vendor exists.private final String
The package specification's version ornull
if no such version exists. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the package implementation's title ornull
if no such title exists.Returns the package implementation's vendor ornull
if no such vendor exists.Returns the package implementation's version ornull
if no such version exists.The URL representing the seal base.Returns the package specification's title ornull
if no such title exists.Returns the package specification's vendor ornull
if no such vendor exists.Returns the package specification's version ornull
if no such version exists.int
hashCode()
boolean
isCompatibleTo
(Package definedPackage) Validates that this package definition is compatible to a previously defined package.boolean
Indicates if a package should be defined at all.
-
Field Details
-
sealBase
The seal base ornull
if the package is not sealed. -
specificationTitle
The package specification's title ornull
if no such title exists. -
specificationVersion
The package specification's version ornull
if no such version exists. -
specificationVendor
The package specification's vendor ornull
if no such vendor exists. -
implementationTitle
The package implementation's title ornull
if no such title exists. -
implementationVersion
The package implementation's version ornull
if no such version exists. -
implementationVendor
The package implementation's vendor ornull
if no such vendor exists.
-
-
Constructor Details
-
Simple
public Simple(@MaybeNull String specificationTitle, @MaybeNull String specificationVersion, @MaybeNull String specificationVendor, @MaybeNull String implementationTitle, @MaybeNull String implementationVersion, @MaybeNull String implementationVendor, @MaybeNull URL sealBase) Creates a new simple package definition.- Parameters:
specificationTitle
- The package specification's title ornull
if no such title exists.specificationVersion
- The package specification's version ornull
if no such version exists.specificationVendor
- The package specification's vendor ornull
if no such vendor exists.implementationTitle
- The package implementation's title ornull
if no such title exists.implementationVersion
- The package implementation's version ornull
if no such version exists.implementationVendor
- The package implementation's vendor ornull
if no such vendor exists.sealBase
- The seal base ornull
if the package is not sealed.
-
-
Method Details
-
isDefined
public boolean isDefined()Indicates if a package should be defined at all.- Specified by:
isDefined
in interfacePackageDefinitionStrategy.Definition
- Returns:
true
if the package is to be defined.
-
getSpecificationTitle
Returns the package specification's title ornull
if no such title exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationTitle
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package specification's title.
-
getSpecificationVersion
Returns the package specification's version ornull
if no such version exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationVersion
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package specification's version.
-
getSpecificationVendor
Returns the package specification's vendor ornull
if no such vendor exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationVendor
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package specification's vendor.
-
getImplementationTitle
Returns the package implementation's title ornull
if no such title exists. This method must only be called for defined package definitions.- Specified by:
getImplementationTitle
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package implementation's title.
-
getImplementationVersion
Returns the package implementation's version ornull
if no such version exists. This method must only be called for defined package definitions.- Specified by:
getImplementationVersion
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package implementation's version.
-
getImplementationVendor
Returns the package implementation's vendor ornull
if no such vendor exists. This method must only be called for defined package definitions.- Specified by:
getImplementationVendor
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The package implementation's vendor.
-
getSealBase
The URL representing the seal base. This method must only be called for defined package definitions.- Specified by:
getSealBase
in interfacePackageDefinitionStrategy.Definition
- Returns:
- The seal base of the package.
-
isCompatibleTo
Validates that this package definition is compatible to a previously defined package. This method must only be called for defined package definitions.- Specified by:
isCompatibleTo
in interfacePackageDefinitionStrategy.Definition
- Parameters:
definedPackage
- The previously defined package.- Returns:
false
if this package and the defined package's sealing information are not compatible.
-
hashCode
public int hashCode() -
equals
-