是否可以更改 IntelliJ 的 equals() 和 hashCode() 代码生成模板 [英] Is it possible to change IntelliJ's code generation template for equals() and hashCode()
问题描述
是否可以更改 equals()
和 hashCode()
的代码生成模板?
我希望生成的代码对这些方法使用 Java 7 Objects
类.
截至 release 14.1,可以在不使用任何第三方插件的情况下自定义equals()/hashCode()的代码生成模板.>
按Alt + Insert"(生成...),选择equals() 和 hashCode()",您将能够选择预定义模板之一或您自己的自定义模板.
Is it possible to change the code generation template for equals()
and hashCode()
?
I would like the generated code to use the Java 7 Objects
class for theses methods.
As of release 14.1 of the Ultimate Edition it is possible to customize the Code generation template of equals()/hashCode() without the use of any third party plugin.
Press "Alt + Insert" (Generate...), choose "equals() and hashCode()" and you will be able to select one of the predefined templates or a customized template of your own.
这篇关于是否可以更改 IntelliJ 的 equals() 和 hashCode() 代码生成模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!