Record Class ModelData
java.lang.Object
java.lang.Record
org.apache.maven.internal.impl.model.ModelData
Holds a model along with some auxiliary information. This internal utility class assists the model builder during POM
processing by providing a means to transport information that cannot be (easily) extracted from the model itself.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Model
The field for themodel
record component.private final ModelSource
The field for thesource
record component. -
Constructor Summary
ConstructorsConstructorDescriptionModelData
(ModelSource source, Model model) Creates an instance of aModelData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Gets unique identifier of the modelmodel()
Returns the value of themodel
record component.source()
Returns the value of thesource
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
source
The field for thesource
record component. -
model
The field for themodel
record component.
-
-
Constructor Details
-
ModelData
ModelData(ModelSource source, Model model) Creates an instance of aModelData
record class.- Parameters:
source
- the value for thesource
record componentmodel
- the value for themodel
record component
-
-
Method Details
-
id
Gets unique identifier of the model- Returns:
- The effective identifier of the model, never
null
.
-
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)
. -
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-