Class Library
java.lang.Object
org.springframework.boot.loader.tools.Library
- Direct Known Subclasses:
JarModeLibrary
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 Summary
ConstructorDescriptionLibrary
(File file, LibraryScope scope) Create a newLibrary
.Library
(String name, File file, LibraryScope scope, LibraryCoordinates coordinates, boolean unpackRequired, boolean local, boolean included) Create a newLibrary
. -
Method Summary
Modifier and TypeMethodDescriptionReturn the coordinates of the library.getFile()
Return the library file.getName()
Return the name of file as it should be written.getScope()
Return the scope of the library.boolean
Return if the library is included in the uber jar.boolean
isLocal()
Return if the library is local (part of the same build) to the application that is being packaged.boolean
Return if the file cannot be used directly as a nested jar and needs to be unpacked.
-
Constructor Details
-
Library
Create a newLibrary
.- Parameters:
file
- the source filescope
- the scope of the library
-
Library
public Library(String name, File file, LibraryScope scope, LibraryCoordinates coordinates, boolean unpackRequired, boolean local, boolean included) Create a newLibrary
.- Parameters:
name
- the name of the library as it should be written ornull
to use the file namefile
- the source filescope
- the scope of the librarycoordinates
- the library coordinates ornull
unpackRequired
- if the library needs to be unpacked before it can be usedlocal
- if the library is local (part of the same build) to the application that is being packagedincluded
- if the library is included in the uber jar- Since:
- 2.4.8
-
-
Method Details
-
getName
Return the name of file as it should be written.- Returns:
- the name
-
getFile
Return the library file.- Returns:
- the file
-
getScope
Return the scope of the library.- Returns:
- the scope
-
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
-