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 java.lang.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
Fields Modifier and Type Field Description protected java.net.URLsealBaseThe seal base ornullif the package is not sealed.
-
Constructor Summary
Constructors Constructor Description Simple(java.lang.String specificationTitle, java.lang.String specificationVersion, java.lang.String specificationVendor, java.lang.String implementationTitle, java.lang.String implementationVersion, java.lang.String implementationVendor, java.net.URL sealBase)Creates a new simple package definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetImplementationTitle()Returns the package implementation's title ornullif no such title exists.java.lang.StringgetImplementationVendor()Returns the package implementation's vendor ornullif no such vendor exists.java.lang.StringgetImplementationVersion()Returns the package implementation's version ornullif no such version exists.java.net.URLgetSealBase()The URL representing the seal base.java.lang.StringgetSpecificationTitle()Returns the package specification's title ornullif no such title exists.java.lang.StringgetSpecificationVendor()Returns the package specification's vendor ornullif no such vendor exists.java.lang.StringgetSpecificationVersion()Returns the package specification's version ornullif no such version exists.inthashCode()booleanisCompatibleTo(java.lang.Package definedPackage)Validates that this package definition is compatible to a previously defined package.booleanisDefined()Indicates if a package should be defined at all.
-
-
-
Constructor Detail
-
Simple
public Simple(java.lang.String specificationTitle, java.lang.String specificationVersion, java.lang.String specificationVendor, java.lang.String implementationTitle, java.lang.String implementationVersion, java.lang.String implementationVendor, java.net.URL sealBase)Creates a new simple package definition.- Parameters:
specificationTitle- The package specification's title ornullif no such title exists.specificationVersion- The package specification's version ornullif no such version exists.specificationVendor- The package specification's vendor ornullif no such vendor exists.implementationTitle- The package implementation's title ornullif no such title exists.implementationVersion- The package implementation's version ornullif no such version exists.implementationVendor- The package implementation's vendor ornullif no such vendor exists.sealBase- The seal base ornullif the package is not sealed.
-
-
Method Detail
-
isDefined
public boolean isDefined()
Description copied from interface:PackageDefinitionStrategy.DefinitionIndicates if a package should be defined at all.- Specified by:
isDefinedin interfacePackageDefinitionStrategy.Definition- Returns:
trueif the package is to be defined.
-
getSpecificationTitle
public java.lang.String getSpecificationTitle()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package specification's title ornullif no such title exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationTitlein interfacePackageDefinitionStrategy.Definition- Returns:
- The package specification's title.
-
getSpecificationVersion
public java.lang.String getSpecificationVersion()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package specification's version ornullif no such version exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationVersionin interfacePackageDefinitionStrategy.Definition- Returns:
- The package specification's version.
-
getSpecificationVendor
public java.lang.String getSpecificationVendor()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package specification's vendor ornullif no such vendor exists. This method must only be called for defined package definitions.- Specified by:
getSpecificationVendorin interfacePackageDefinitionStrategy.Definition- Returns:
- The package specification's vendor.
-
getImplementationTitle
public java.lang.String getImplementationTitle()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package implementation's title ornullif no such title exists. This method must only be called for defined package definitions.- Specified by:
getImplementationTitlein interfacePackageDefinitionStrategy.Definition- Returns:
- The package implementation's title.
-
getImplementationVersion
public java.lang.String getImplementationVersion()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package implementation's version ornullif no such version exists. This method must only be called for defined package definitions.- Specified by:
getImplementationVersionin interfacePackageDefinitionStrategy.Definition- Returns:
- The package implementation's version.
-
getImplementationVendor
public java.lang.String getImplementationVendor()
Description copied from interface:PackageDefinitionStrategy.DefinitionReturns the package implementation's vendor ornullif no such vendor exists. This method must only be called for defined package definitions.- Specified by:
getImplementationVendorin interfacePackageDefinitionStrategy.Definition- Returns:
- The package implementation's vendor.
-
getSealBase
public java.net.URL getSealBase()
Description copied from interface:PackageDefinitionStrategy.DefinitionThe URL representing the seal base. This method must only be called for defined package definitions.- Specified by:
getSealBasein interfacePackageDefinitionStrategy.Definition- Returns:
- The seal base of the package.
-
isCompatibleTo
public boolean isCompatibleTo(java.lang.Package definedPackage)
Description copied from interface:PackageDefinitionStrategy.DefinitionValidates that this package definition is compatible to a previously defined package. This method must only be called for defined package definitions.- Specified by:
isCompatibleToin interfacePackageDefinitionStrategy.Definition- Parameters:
definedPackage- The previously defined package.- Returns:
falseif this package and the defined package's sealing information are not compatible.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-