Package com.tnsai.prompt
Record Class ProjectContextLoader.ProjectContext
java.lang.Object
java.lang.Record
com.tnsai.prompt.ProjectContextLoader.ProjectContext
- Record Components:
path- path to the file that was readcontent- the file's UTF-8 content
- Enclosing class:
ProjectContextLoader
Result of a successful load.
-
Constructor Summary
ConstructorsConstructorDescriptionProjectContext(Path path, String content) Creates an instance of aProjectContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a system-prompt-ready section: a labeled heading + the content.content()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
asSystemPromptSection
Returns a system-prompt-ready section: a labeled heading + the content. The heading makes it easier for the LLM to distinguish project context from the rest of the system prompt. -
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
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-