Record Class Changes.Change.OtherFileChange
java.lang.Object
java.lang.Record
org.springframework.modulith.junit.Changes.Change.OtherFileChange
- All Implemented Interfaces:
Changes.Change
- Enclosing interface:
- Changes.Change
public static record Changes.Change.OtherFileChange(String path)
extends Record
implements Changes.Change
Some arbitrary file change.
- Author:
- Lukas Dohmen, David Bilge, Oliver Drotbohm
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.modulith.junit.Changes.Change
Changes.Change.JavaSourceChange, Changes.Change.JavaTestSourceChange, Changes.Change.OtherFileChange, Changes.Change.SourceChange
-
Constructor Summary
ConstructorDescriptionOtherFileChange
(String path) Creates an instance of aOtherFileChange
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the change affects a build resource.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns whether the change has the given origin.boolean
Returns whether the change affects a classpath resource (in contrast to other resources).path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
OtherFileChange
Creates an instance of aOtherFileChange
record class.- Parameters:
path
- the value for thepath
record component
-
-
Method Details
-
affectsBuildResource
public boolean affectsBuildResource()Returns whether the change affects a build resource. -
hasOrigin
Description copied from interface:Changes.Change
Returns whether the change has the given origin.- Specified by:
hasOrigin
in interfaceChanges.Change
- Parameters:
nameOrPath
- must not be null or empty.
-
isClasspathResource
public boolean isClasspathResource()Returns whether the change affects a classpath resource (in contrast to other resources). -
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 thepath
record component.- Returns:
- the value of the
path
record component
-