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
ConstructorsConstructorDescriptionLibrary
(File file, LibraryScope scope) Create a newLibrary
.Library
(@Nullable String name, @Nullable File file, @Nullable LibraryScope scope, @Nullable LibraryCoordinates coordinates, boolean unpackRequired, boolean local, boolean included) Create a newLibrary
. -
Method Summary
Modifier and TypeMethodDescription@Nullable LibraryCoordinates
Return the coordinates of the library.@Nullable File
getFile()
Return the library file.getName()
Return the name of file as it should be written.@Nullable LibraryScope
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(@Nullable String name, @Nullable File file, @Nullable LibraryScope scope, @Nullable 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
-
getFile
-
getScope
-
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
-