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.
  • Field Details

    • sealBase

      protected final URL sealBase
      The seal base or null if the package is not sealed.
    • specificationTitle

      private final String specificationTitle
      The package specification's title or null if no such title exists.
    • specificationVersion

      private final String specificationVersion
      The package specification's version or null if no such version exists.
    • specificationVendor

      private final String specificationVendor
      The package specification's vendor or null if no such vendor exists.
    • implementationTitle

      private final String implementationTitle
      The package implementation's title or null if no such title exists.
    • implementationVersion

      private final String implementationVersion
      The package implementation's version or null if no such version exists.
    • implementationVendor

      private final String implementationVendor
      The package implementation's vendor or null if no such vendor exists.
  • Constructor Details

    • Simple

      public Simple(String specificationTitle, String specificationVersion, String specificationVendor, String implementationTitle, String implementationVersion, String implementationVendor, URL sealBase)
      Creates a new simple package definition.
      Parameters:
      specificationTitle - The package specification's title or null if no such title exists.
      specificationVersion - The package specification's version or null if no such version exists.
      specificationVendor - The package specification's vendor or null if no such vendor exists.
      implementationTitle - The package implementation's title or null if no such title exists.
      implementationVersion - The package implementation's version or null if no such version exists.
      implementationVendor - The package implementation's vendor or null if no such vendor exists.
      sealBase - The seal base or null 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 interface PackageDefinitionStrategy.Definition
      Returns:
      true if the package is to be defined.
    • getSpecificationTitle

      public String getSpecificationTitle()
      Returns the package specification's title or null if no such title exists. This method must only be called for defined package definitions.
      Specified by:
      getSpecificationTitle in interface PackageDefinitionStrategy.Definition
      Returns:
      The package specification's title.
    • getSpecificationVersion

      public String getSpecificationVersion()
      Returns the package specification's version or null if no such version exists. This method must only be called for defined package definitions.
      Specified by:
      getSpecificationVersion in interface PackageDefinitionStrategy.Definition
      Returns:
      The package specification's version.
    • getSpecificationVendor

      public String getSpecificationVendor()
      Returns the package specification's vendor or null if no such vendor exists. This method must only be called for defined package definitions.
      Specified by:
      getSpecificationVendor in interface PackageDefinitionStrategy.Definition
      Returns:
      The package specification's vendor.
    • getImplementationTitle

      public String getImplementationTitle()
      Returns the package implementation's title or null if no such title exists. This method must only be called for defined package definitions.
      Specified by:
      getImplementationTitle in interface PackageDefinitionStrategy.Definition
      Returns:
      The package implementation's title.
    • getImplementationVersion

      public String getImplementationVersion()
      Returns the package implementation's version or null if no such version exists. This method must only be called for defined package definitions.
      Specified by:
      getImplementationVersion in interface PackageDefinitionStrategy.Definition
      Returns:
      The package implementation's version.
    • getImplementationVendor

      public String getImplementationVendor()
      Returns the package implementation's vendor or null if no such vendor exists. This method must only be called for defined package definitions.
      Specified by:
      getImplementationVendor in interface PackageDefinitionStrategy.Definition
      Returns:
      The package implementation's vendor.
    • getSealBase

      public URL getSealBase()
      The URL representing the seal base. This method must only be called for defined package definitions.
      Specified by:
      getSealBase in interface PackageDefinitionStrategy.Definition
      Returns:
      The seal base of the package.
    • isCompatibleTo

      public boolean isCompatibleTo(Package definedPackage)
      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 interface PackageDefinitionStrategy.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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object