Interface Layout
- All Known Subinterfaces:
RepackagingLayout
- All Known Implementing Classes:
Layouts.Expanded
,Layouts.Jar
,Layouts.None
,Layouts.War
public interface Layout
Strategy interface used to determine the layout for a particular type of archive.
Layouts may additionally implement
CustomLoaderLayout
if they wish to write
custom loader classes.- Since:
- 1.0.0
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the location of classes within the archive.default @Nullable String
Returns the location of the classpath index file that should be written ornull
if not index is required.@Nullable String
Returns the launcher class name for this layout.default @Nullable String
Returns the location of the layer index file that should be written ornull
if not index is required.@Nullable String
getLibraryLocation
(String libraryName, @Nullable LibraryScope scope) Returns the destination path for a given library.boolean
Returns if loader classes should be included to make the archive executable.
-
Method Details
-
getLauncherClassName
@Nullable String getLauncherClassName()Returns the launcher class name for this layout.- Returns:
- the launcher class name
-
getLibraryLocation
Returns the destination path for a given library.- Parameters:
libraryName
- the name of the library (excluding any path)scope
- the scope of the library- Returns:
- the location of the library relative to the root of the archive (should end
with '/') or
null
if the library should not be included.
-
getClassesLocation
String getClassesLocation()Returns the location of classes within the archive.- Returns:
- the classes location
-
getClasspathIndexFileLocation
Returns the location of the classpath index file that should be written ornull
if not index is required. The result should include the filename and is relative to the root of the jar.- Returns:
- the classpath index file location
- Since:
- 2.5.0
-
getLayersIndexFileLocation
Returns the location of the layer index file that should be written ornull
if not index is required. The result should include the filename and is relative to the root of the jar.- Returns:
- the layer index file location
- Since:
- 2.5.0
-
isExecutable
boolean isExecutable()Returns if loader classes should be included to make the archive executable.- Returns:
- if the layout is executable
-