Record Class Package.Stub

java.lang.Object
java.lang.Record
jdk.jpackage.internal.model.Package.Stub
All Implemented Interfaces:
Package
Enclosing interface:
Package

public static record Package.Stub(Application app, PackageType type, String packageName, String description, String version, Optional<String> aboutURL, Optional<Path> licenseFile, Optional<Path> predefinedAppImage, Path relativeInstallDir) extends Record implements Package
Default implementation of Package interface.
  • Constructor Details

    • Stub

      public Stub(Application app, PackageType type, String packageName, String description, String version, Optional<String> aboutURL, Optional<Path> licenseFile, Optional<Path> predefinedAppImage, Path relativeInstallDir)
      Creates an instance of a Stub record class.
      Parameters:
      app - the value for the app record component
      type - the value for the type record component
      packageName - the value for the packageName record component
      description - the value for the description record component
      version - the value for the version record component
      aboutURL - the value for the aboutURL record component
      licenseFile - the value for the licenseFile record component
      predefinedAppImage - the value for the predefinedAppImage record component
      relativeInstallDir - the value for the relativeInstallDir record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • app

      public Application app()
      Returns the value of the app record component.
      Specified by:
      app in interface Package
      Returns:
      the value of the app record component
    • type

      public PackageType type()
      Returns the value of the type record component.
      Specified by:
      type in interface Package
      Returns:
      the value of the type record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Specified by:
      packageName in interface Package
      Returns:
      the value of the packageName record component
    • description

      public String description()
      Returns the value of the description record component.
      Specified by:
      description in interface Package
      Returns:
      the value of the description record component
    • version

      public String version()
      Returns the value of the version record component.
      Specified by:
      version in interface Package
      Returns:
      the value of the version record component
    • aboutURL

      public Optional<String> aboutURL()
      Returns the value of the aboutURL record component.
      Specified by:
      aboutURL in interface Package
      Returns:
      the value of the aboutURL record component
    • licenseFile

      public Optional<Path> licenseFile()
      Returns the value of the licenseFile record component.
      Specified by:
      licenseFile in interface Package
      Returns:
      the value of the licenseFile record component
    • predefinedAppImage

      public Optional<Path> predefinedAppImage()
      Returns the value of the predefinedAppImage record component.
      Specified by:
      predefinedAppImage in interface Package
      Returns:
      the value of the predefinedAppImage record component
    • relativeInstallDir

      public Path relativeInstallDir()
      Returns the value of the relativeInstallDir record component.
      Specified by:
      relativeInstallDir in interface Package
      Returns:
      the value of the relativeInstallDir record component