Class Library


  • public class Library
    extends java.lang.Object
    Encapsulates information about a single library that may be packed into the archive.
    Since:
    1.1.2
    Author:
    Phillip Webb
    See Also:
    Libraries
    • Method Summary

      Modifier and Type Method Description
      java.io.File getFile()
      Return the library file.
      java.lang.String getName()
      Return the name of file as it should be written.
      LibraryScope getScope()
      Return the scope of the library.
      boolean isUnpackRequired()
      Return if the file cannot be used directly as a nested jar and needs to be unpacked.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Library

        public Library​(java.io.File file,
                       LibraryScope scope)
        Create a new Library.
        Parameters:
        file - the source file
        scope - the scope of the library
      • Library

        public Library​(java.io.File file,
                       LibraryScope scope,
                       boolean unpackRequired)
        Create a new Library.
        Parameters:
        file - the source file
        scope - the scope of the library
        unpackRequired - if the library needs to be unpacked before it can be used
      • Library

        public Library​(java.lang.String name,
                       java.io.File file,
                       LibraryScope scope,
                       boolean unpackRequired)
        Create a new Library.
        Parameters:
        name - the name of the library as it should be written or null to use the file name
        file - the source file
        scope - the scope of the library
        unpackRequired - if the library needs to be unpacked before it can be used
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of file as it should be written.
        Returns:
        then name.
      • getFile

        public java.io.File getFile()
        Return the library file.
        Returns:
        the file
      • getScope

        public LibraryScope getScope()
        Return the scope of the library.
        Returns:
        the scope
      • isUnpackRequired

        public boolean isUnpackRequired()
        Return if the file cannot be used directly as a nested jar and needs to be unpacked.
        Returns:
        if unpack is required