给出简单的类
class MyClass {
private var myVar: String = _
}
我如何为
myVar
生成setter和getter?
Code | Generate
菜单中显示:
- Override Methods(重写方法)...
- Implement Methods(实现方法)...
- Delegate Methods(委托方法)...
- 版权
- equals() 和 hashCode()
- toString()
- 伴随对象
IntelliJ
版本:14.1.5
操作系统:OS X 10.10.5
val
)相结合,类似于Java类中具有public final
字段的情况。 - Zoltán