Record Class McpCodeBlock
java.lang.Object
java.lang.Record
com.shaft.mcp.McpCodeBlock
- Record Components:
id- stable block identifiertitle- short titlekind- snippet typelanguage- code languageimports- imports needed by the blockcode- block content without Markdown fencesplacement- where the block is intended to be pastedcopyPasteReady- whether the block is directly usable without filling placeholdersevidenceIds- evidence references supporting the blockwarnings- safe warnings
public record McpCodeBlock(String id, String title, McpCodeBlock.Kind kind, String language, List<String> imports, String code, String placement, boolean copyPasteReady, List<String> evidenceIds, List<String> warnings)
extends Record
Safe copy-paste code block returned by local MCP remediation tools.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.booleanReturns the value of thecopyPasteReadyrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceIdsrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.imports()Returns the value of theimportsrecord component.kind()Returns the value of thekindrecord component.language()Returns the value of thelanguagerecord component.Returns the value of theplacementrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
McpCodeBlock
-
-
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
-
title
-
kind
-
language
-
imports
-
code
-
placement
-
copyPasteReady
public boolean copyPasteReady()Returns the value of thecopyPasteReadyrecord component.- Returns:
- the value of the
copyPasteReadyrecord component
-
evidenceIds
Returns the value of theevidenceIdsrecord component.- Returns:
- the value of the
evidenceIdsrecord component
-
warnings
-