Package dev.architectury.loom.mcpconfig
Record Class McpConfigFunction
java.lang.Object
java.lang.Record
dev.architectury.loom.mcpconfig.McpConfigFunction
- Record Components:
version- the Gradle-style dependency string of the programargs- the command-line argumentsjvmArgs- the JVM argumentsrepo- the Maven repository to download the dependency from, ornullif not specified
- All Implemented Interfaces:
Serializable
public record McpConfigFunction(String version, List<ConfigValue> args, List<ConfigValue> jvmArgs, @Nullable String repo)
extends Record
implements Serializable
An executable program for steps.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMcpConfigFunction(String version, List<ConfigValue> args, List<ConfigValue> jvmArgs, @Nullable String repo) Creates an instance of aMcpConfigFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.static McpConfigFunctionfromJson(com.google.gson.JsonObject json) Returns 工具 jar 的下载地址.final inthashCode()Returns a hash code value for this object.jvmArgs()Returns the value of thejvmArgsrecord component.@Nullable Stringrepo()Returns the value of thereporecord component.resolvePath(StepLogic.SetupContext context) Returns 本函数的工具 jar 落位路径.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
McpConfigFunction
public McpConfigFunction(String version, List<ConfigValue> args, List<ConfigValue> jvmArgs, @Nullable String repo) Creates an instance of aMcpConfigFunctionrecord class.
-
-
Method Details
-
resolvePath
Returns 本函数的工具 jar 落位路径..两条来源都不下载:
repo非空时按 URL 在下载缓存里算路径(纯计算,见StepLogic.SetupContext.downloadCachePath(java.lang.String));否则交给 Gradle 依赖解析(其缓存位置本就稳定)。 下载由执行期的StepLogic.ExecutionContext.ensureToolJar(java.nio.file.Path, java.lang.String)完成。- Returns:
- 本函数的工具 jar 落位路径
- Throws:
IOException
-
getDownloadUrl
Returns 工具 jar 的下载地址.;repo为空时无意义.- Returns:
- 工具 jar 的下载地址
-
fromJson
-
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). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-
jvmArgs
Returns the value of thejvmArgsrecord component.- Returns:
- the value of the
jvmArgsrecord component
-
repo
Returns the value of thereporecord component.- Returns:
- the value of the
reporecord component
-