Class SourceFileInfo
java.lang.Object
uno.anahata.ai.tools.spi.pojos.FileInfo
uno.anahata.ai.nb.model.java.SourceFileInfo
- All Implemented Interfaces:
StatefulResource
-
Constructor Summary
ConstructorsConstructorDescriptionSourceFileInfo(String path, String content, long contentLines, long lastModified, long size, SourceOrigin originType, String originLocation, TextChunk chunk) -
Method Summary
Methods inherited from class FileInfo
getContent, getContentLines, getLastModified, getPath, getSize, toString
-
Constructor Details
-
SourceFileInfo
public SourceFileInfo(String path, String content, long contentLines, long lastModified, long size, SourceOrigin originType, String originLocation, TextChunk chunk)
-
-
Method Details
-
getResourceId
Overridden to enforce safety. A SourceFileInfo is only considered a stateful, trackable resource if it represents the *full* content of a file that belongs to an open project. In all other cases (e.g., from a JAR, from the JDK, or a partial/paginated view), it returns null, making it ephemeral to the ResourceTracker.- Specified by:
getResourceIdin interfaceStatefulResource- Overrides:
getResourceIdin classFileInfo- Returns:
- The file path if the resource is stateful, otherwise null.
-
