Record Class JavaSourceDocument
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.JavaSourceDocument
public record JavaSourceDocument(SourceDocumentId id, String content, boolean generated)
extends Record
Caller-supplied source text; source files are never located or executed implicitly.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaSourceDocument(SourceDocumentId id, String content, boolean generated) Creates an instance of aJavaSourceDocumentrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thegeneratedrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JavaSourceDocument
Creates an instance of aJavaSourceDocumentrecord class.- Parameters:
id- the value for theidrecord componentcontent- the value for thecontentrecord componentgenerated- the value for thegeneratedrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
generated
public boolean generated()Returns the value of thegeneratedrecord component.- Returns:
- the value of the
generatedrecord component
-