Record Class LayerSpec
java.lang.Object
java.lang.Record
org.tentackle.common.LayerSpec
- Record Components:
name- the layer name, unique within aLayerGraphSpecparentNames- the names of the parent layers, empty if parented on the boot layerdirectories- the module-path directories (or exploded module directories) building this layer
public record LayerSpec(String name, List<String> parentNames, List<Path> directories)
extends Record
The declarative description of one named
ModuleLayer.
A layer is defined by the module-path directories it is built from and the names of the
layers it is parented on. An empty parentNames() means the layer is parented
directly on the boot layer.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectoriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of theparentNamesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LayerSpec
Creates a layer spec.- Parameters:
name- the layer nameparentNames- the names of the parent layersdirectories- the module-path directories- Throws:
NullPointerException- if any argument is nullTentackleRuntimeException- if the name is blank or there are no directories
-
-
Method Details
-
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). -
name
-
parentNames
Returns the value of theparentNamesrecord component.- Returns:
- the value of the
parentNamesrecord component
-
directories
Returns the value of thedirectoriesrecord component.- Returns:
- the value of the
directoriesrecord component
-