Record Class NestedLocation
java.lang.Object
java.lang.Record
org.springframework.boot.loader.net.protocol.nested.NestedLocation
- Record Components:
path- the path to the zip that contains the nested entrynestedEntryName- the nested entry name
A location obtained from a
nested: URL consisting of a jar file and an
optional nested entry.
The syntax of a nested JAR URL is:
nestedjar:<path>/!{entry}
for example:
nested:/home/example/my.jar/!BOOT-INF/lib/my-nested.jar
or:
nested:/home/example/my.jar/!BOOT-INF/classes/
The path must refer to a jar file on the file system. The entry refers to either an
uncompressed entry that contains the nested jar, or a directory entry. The entry must
not start with a '/'.
- Since:
- 3.2.0
- Author:
- Phillip Webb, Andy Wilkinson
-
Constructor Summary
ConstructorsConstructorDescriptionNestedLocation(Path path, String nestedEntryName) Creates an instance of aNestedLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static NestedLocationCreate a newNestedLocationfrom the given URI.static NestedLocationCreate a newNestedLocationfrom the given URL.final inthashCode()Returns a hash code value for this object.Returns the value of thenestedEntryNamerecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NestedLocation
Creates an instance of aNestedLocationrecord class.- Parameters:
path- the value for thepathrecord componentnestedEntryName- the value for thenestedEntryNamerecord component
-
-
Method Details
-
fromUrl
Create a newNestedLocationfrom the given URL.- Parameters:
url- the nested URL- Returns:
- a new
NestedLocationinstance - Throws:
IllegalArgumentException- if the URL is not valid
-
fromUri
Create a newNestedLocationfrom the given URI.- Parameters:
uri- the nested URI- Returns:
- a new
NestedLocationinstance - Throws:
IllegalArgumentException- if the URI is not valid
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
nestedEntryName
Returns the value of thenestedEntryNamerecord component.- Returns:
- the value of the
nestedEntryNamerecord component
-