Each JTCEvent subclass will define static final values for the major and minor fields that represent its purpose.
每个JTCEvent子类都会为表示其用途的major和minor字段定义静态最终值。
The guide recommends you use a static final variable to create the object once at application startup and then get this object when needed.
该指南建议您在应用程序启动时使用一个静态最终变量来创建这个对象,然后根据需要获取该对象。
Since it is thread safe by design, you might cache it in a public static final variable, or wrap it in a singleton pattern after creation for later access.
因为根据设计它是线程安全的,创建它之后可以把它缓存在一个公共静态最终变量中,或者包装在单实例模式中以供以后访问。
Extract constant is similar to Extract Local Variable, but you must select a static, constant expression, which the refactoring will convert to a static final constant.
ExtractConstant与ExtractLocalVariable相似,但是您必须选择静态常量表达式,重构工具将会把它转换成静态的final常量。
Extract constant is similar to Extract Local Variable, but you must select a static, constant expression, which the refactoring will convert to a static final constant.
ExtractConstant与ExtractLocalVariable相似,但是您必须选择静态常量表达式,重构工具将会把它转换成静态的final常量。
应用推荐