Enum ArchiveFormat

    • Method Detail

      • values

        public static ArchiveFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ArchiveFormat c : ArchiveFormat.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ArchiveFormat valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getFormatFromFilename

        public static Optional<ArchiveFormat> getFormatFromFilename​(String filename)
        Gets the archive format based on a file
        Parameters:
        filename - The filename to try to use
        Returns:
        The archive format, or empty if no matching format could be found
      • getFormatFromShortName

        public static Optional<ArchiveFormat> getFormatFromShortName​(String shortName)
        Gets the archive format based on a short name
        Parameters:
        shortName - The short name used in build files
        Returns:
        The archive format, or empty if no matching format could be found
      • getUnarchiver

        public Unarchiver getUnarchiver()
        Get the unarchiver used to extract archives of this type
      • getExtension

        public String getExtension()
        Get the extension (including '.') for this archive type
      • getShortName

        public String getShortName()
        Get the short name for the archive type
      • getShortNames

        public static com.google.common.collect.ImmutableList<String> getShortNames()
        Get all available short names
      • getFileExtensions

        public static com.google.common.collect.ImmutableList<String> getFileExtensions()
        Get all available file extensions