gpt4 book ai didi

scala - Scala中的嵌套注释列表

转载 作者:行者123 更新时间:2023-12-04 07:45:13 27 4
gpt4 key购买 nike

帮助,

我该如何在Scala中执行以下操作?

import org.hibernate.validator.constraints.ScriptAssert

@ScriptAssert.List({
@ScriptAssert(script = "...", lang = "javascript"),
@ScriptAssert(script = "...", lang = "javascript")})

最佳答案

正确的语法如下(数组的Array(...),嵌套的注释的new Nested(..)):

import org.hibernate.validator.constraints.ScriptAssert

@ScriptAssert.List(Array(
new ScriptAssert(script = "...", lang = "javascript"),
new ScriptAssert(script = "...", lang = "javascript")))
class Test

关于scala - Scala中的嵌套注释列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3827195/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com