Record Class AdocLibrary
java.lang.Object
java.lang.Record
network.ike.plugin.adoc.AdocLibrary
- Record Components:
coordinates- the library's coordinateszip- the resolvedadoczip, or null for a reactor membersourceRoot- the reactor member'ssrc/docs/asciidoc, or null for a zip
One library to put in the union: either an external zip resolved from a repository, or a
module of the same reactor whose AsciiDoc source root is on this machine. Exactly one of
zip() and sourceRoot() is set.-
Constructor Summary
ConstructorsConstructorDescriptionAdocLibrary(AdocCoordinates coordinates, Path zip, Path sourceRoot) Checks that the coordinates are present and that exactly one source is set. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecoordinatesrecord component.final booleanIndicates whether some other object is "equal to" this one.static AdocLibraryexternal(AdocCoordinates coordinates, Path zip) A library resolved as a zip from a repository.final inthashCode()Returns a hash code value for this object.booleanWhether this library is a module of the same reactor.static AdocLibraryreactor(AdocCoordinates coordinates, Path sourceRoot) A library that is a module of the same reactor.Returns the value of thesourceRootrecord component.final StringtoString()Returns a string representation of this record class.zip()Returns the value of theziprecord component.
-
Constructor Details
-
AdocLibrary
Checks that the coordinates are present and that exactly one source is set.- Parameters:
coordinates- the coordinateszip- the zip, or nullsourceRoot- the source root, or null
-
-
Method Details
-
external
A library resolved as a zip from a repository.- Parameters:
coordinates- the coordinateszip- the zip file- Returns:
- the library
-
reactor
A library that is a module of the same reactor.- Parameters:
coordinates- the coordinatessourceRoot- the module's AsciiDoc source root,src/docs/asciidoc- Returns:
- the library
-
isReactor
public boolean isReactor()Whether this library is a module of the same reactor.- Returns:
- true for a reactor member, false for a zip
-
toString
-
hashCode
-
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). -
coordinates
Returns the value of thecoordinatesrecord component.- Returns:
- the value of the
coordinatesrecord component
-
zip
-
sourceRoot
Returns the value of thesourceRootrecord component.- Returns:
- the value of the
sourceRootrecord component
-