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
ConstructorsConstructorDescriptionOtherFileChange(String path) Creates an instance of aOtherFileChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the change affects a build resource.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether the change has the given origin.booleanReturns whether the change affects a classpath resource (in contrast to other resources).path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OtherFileChange
Creates an instance of aOtherFileChangerecord class.- Parameters:
path- the value for thepathrecord component
-
-
Method Details
-
affectsBuildResource
public boolean affectsBuildResource()Returns whether the change affects a build resource. -
hasOrigin
Description copied from interface:Changes.ChangeReturns whether the change has the given origin.- Specified by:
hasOriginin 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 thepathrecord component.- Returns:
- the value of the
pathrecord component
-