Class Library

java.lang.Object
org.springframework.boot.loader.tools.Library
Direct Known Subclasses:
JarModeLibrary

public class Library extends Object
Encapsulates information about a single library that may be packed into the archive.
Since:
1.1.2
Author:
Phillip Webb, Scott Frederick
See Also:
  • Constructor Details

    • Library

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

      public Library(String name, File file, LibraryScope scope, LibraryCoordinates coordinates, boolean unpackRequired, boolean local, boolean included)
      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
      coordinates - the library coordinates or null
      unpackRequired - if the library needs to be unpacked before it can be used
      local - if the library is local (part of the same build) to the application that is being packaged
      included - if the library is included in the uber jar
      Since:
      2.4.8
  • Method Details

    • getName

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

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

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

      public LibraryCoordinates getCoordinates()
      Return the coordinates of the library.
      Returns:
      the coordinates
    • 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
    • isLocal

      public boolean isLocal()
      Return if the library is local (part of the same build) to the application that is being packaged.
      Returns:
      if the library is local
    • isIncluded

      public boolean isIncluded()
      Return if the library is included in the uber jar.
      Returns:
      if the library is included