Link.Compression (Apache Ant API)

Package org.apache.tools.ant.taskdefs.modules

## Class Link.Compression

- java.lang.Object
- - org.apache.tools.ant.taskdefs.modules.Link.Compression

- Enclosing class:
    Link

      public class Link.Compression
      extends java.lang.Object

  Child element fully describing compression of a linked image. This includes the level, and optionally, the names of files to compress.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Compression()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Link.PatternListEntry` | `createFiles()` | Creates a nested element which can specify a pattern of files to compress.
    `Link.CompressionLevel` | `getLevel()` | Required attribute containing level of compression.
    `void` | `setFiles​(java.lang.String patternList)` | Sets an attribute that represents a list of file patterns to compress in the linked image, as a comma-separated list of PathMatcher patterns or pattern list files.
    `void` | `setLevel​(Link.CompressionLevel level)` | Sets attribute indicating level of compression.
    `java.lang.String` | `toCommandLineOption()` | Converts this element to a single jlink option value.
    `void` | `validate()` | Verifies this element's state.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Compression

          public Compression()

  - ### Method Detail

    - #### getLevel

          public Link.CompressionLevel getLevel()

      Required attribute containing level of compression.
      Returns:
        compression level

    - #### setLevel

          public void setLevel​(Link.CompressionLevel level)

      Sets attribute indicating level of compression.
      Parameters:
        `level` - type of compression to apply to linked image

    - #### createFiles

          public Link.PatternListEntry createFiles()

      Creates a nested element which can specify a pattern of files to compress.
      Returns:
        new, unconfigured child element

    - #### setFiles

          public void setFiles​(java.lang.String patternList)

      Sets an attribute that represents a list of file patterns to compress in the linked image, as a comma-separated list of PathMatcher patterns or pattern list files.
      Parameters:
        `patternList` - comma-separated list of patterns and/or file names
      See Also:
        `Link.PatternListEntry`

    - #### validate

          public void validate()

      Verifies this element's state.
      Throws:
        `BuildException` - if compression level is not set
        `BuildException` - if any nested patterns are invalid

    - #### toCommandLineOption

          public java.lang.String toCommandLineOption()

      Converts this element to a single jlink option value.
      Returns:
        command line option representing this element's state