mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 15:41:26 +07:00
Java: basic support for Valhalla Value Classes (IDEA-364548)
GitOrigin-RevId: 93b0394866aae35772ccc90e7de822af8a94c6ce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
36b258bc98
commit
2b32d9bb56
@@ -126,6 +126,7 @@ feature.statements.before.super=Statements before super()
|
||||
feature.module.import.declarations=Module Import Declarations
|
||||
feature.package.import.shadow.module.import=Import-on-demand over module import
|
||||
feature.package.transitive.dependency.on.java.base=Transitive dependency on java.base module
|
||||
feature.valhalla.value.classes=Valhalla value classes
|
||||
|
||||
else.without.if='else' without 'if'
|
||||
enum.constant.context=Enum constant ''{0}'' in ''{1}''
|
||||
|
||||
@@ -121,6 +121,7 @@ public enum JavaFeature {
|
||||
MODULE_IMPORT_DECLARATIONS(LanguageLevel.JDK_23_PREVIEW, "feature.module.import.declarations"),
|
||||
PACKAGE_IMPORTS_SHADOW_MODULE_IMPORTS(LanguageLevel.JDK_24_PREVIEW, "feature.package.import.shadow.module.import"),
|
||||
TRANSITIVE_DEPENDENCY_ON_JAVA_BASE(LanguageLevel.JDK_24_PREVIEW, "feature.package.transitive.dependency.on.java.base"),
|
||||
VALHALLA_VALUE_CLASSES(LanguageLevel.JDK_X, "feature.valhalla.value.classes"),
|
||||
;
|
||||
|
||||
private final @NotNull LanguageLevel myLevel;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
@@ -151,6 +151,7 @@ public interface JavaTokenType extends TokenType {
|
||||
IElementType YIELD_KEYWORD = new IJavaElementType("YIELD");
|
||||
IElementType RECORD_KEYWORD = new IJavaElementType("RECORD");
|
||||
|
||||
IElementType VALUE_KEYWORD = new IJavaElementType("VALUE_KEYWORD");
|
||||
IElementType SEALED_KEYWORD = new IJavaElementType("SEALED");
|
||||
IElementType NON_SEALED_KEYWORD = new IKeywordElementType("NON_SEALED");
|
||||
IElementType PERMITS_KEYWORD = new IJavaElementType("PERMITS");
|
||||
@@ -299,6 +300,7 @@ public interface JavaTokenType extends TokenType {
|
||||
YIELD_KEYWORD,
|
||||
RECORD_KEYWORD,
|
||||
|
||||
VALUE_KEYWORD,
|
||||
SEALED_KEYWORD,
|
||||
NON_SEALED_KEYWORD,
|
||||
PERMITS_KEYWORD,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
@@ -62,24 +62,24 @@ public interface PsiKeyword extends PsiJavaToken {
|
||||
@NlsSafe String FALSE = "false";
|
||||
@NlsSafe String NULL = "null";
|
||||
|
||||
@NlsSafe String OPEN = "open";
|
||||
@NlsSafe String MODULE = "module";
|
||||
@NlsSafe String REQUIRES = "requires";
|
||||
@NlsSafe String EXPORTS = "exports";
|
||||
@NlsSafe String OPENS = "opens";
|
||||
@NlsSafe String USES = "uses";
|
||||
@NlsSafe String PROVIDES = "provides";
|
||||
@NlsSafe String TRANSITIVE = "transitive";
|
||||
@NlsSafe String TO = "to";
|
||||
@NlsSafe String WITH = "with";
|
||||
|
||||
@NlsSafe String VAR = "var";
|
||||
@NlsSafe String YIELD = "yield";
|
||||
|
||||
@NlsSafe String RECORD = "record";
|
||||
|
||||
@NlsSafe String SEALED = "sealed";
|
||||
@NlsSafe String PERMITS = "permits";
|
||||
@NlsSafe String NON_SEALED = "non-sealed";
|
||||
|
||||
// soft keywords:
|
||||
@NlsSafe String EXPORTS = "exports";
|
||||
@NlsSafe String MODULE = "module";
|
||||
@NlsSafe String OPEN = "open";
|
||||
@NlsSafe String OPENS = "opens";
|
||||
@NlsSafe String PERMITS = "permits";
|
||||
@NlsSafe String PROVIDES = "provides";
|
||||
@NlsSafe String RECORD = "record";
|
||||
@NlsSafe String REQUIRES = "requires";
|
||||
@NlsSafe String SEALED = "sealed";
|
||||
@NlsSafe String TO = "to";
|
||||
@NlsSafe String TRANSITIVE = "transitive";
|
||||
@NlsSafe String USES = "uses";
|
||||
@NlsSafe String VALUE = "value";
|
||||
@NlsSafe String VAR = "var";
|
||||
@NlsSafe String WHEN = "when";
|
||||
@NlsSafe String WITH = "with";
|
||||
@NlsSafe String YIELD = "yield";
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.openapi.util.NlsSafe;
|
||||
@@ -27,13 +27,16 @@ public interface PsiModifier {
|
||||
String SEALED = "sealed";
|
||||
//WARNING: it may not be reported for compiled classes.
|
||||
String NON_SEALED = "non-sealed";
|
||||
String VALUE = "value";
|
||||
|
||||
String[] MODIFIERS = {
|
||||
PUBLIC, PROTECTED, PRIVATE, STATIC, ABSTRACT, FINAL, NATIVE, SYNCHRONIZED, STRICTFP, TRANSIENT, VOLATILE, DEFAULT, OPEN, TRANSITIVE, SEALED, NON_SEALED
|
||||
PUBLIC, PROTECTED, PRIVATE, STATIC, ABSTRACT, FINAL, NATIVE, SYNCHRONIZED, STRICTFP, TRANSIENT, VOLATILE, DEFAULT, OPEN, TRANSITIVE,
|
||||
SEALED, NON_SEALED, VALUE
|
||||
};
|
||||
|
||||
@MagicConstant(stringValues = {
|
||||
PUBLIC, PROTECTED, PRIVATE, STATIC, ABSTRACT, FINAL, NATIVE, SYNCHRONIZED, STRICTFP, TRANSIENT, VOLATILE, DEFAULT, OPEN, TRANSITIVE, PACKAGE_LOCAL, SEALED, NON_SEALED
|
||||
PUBLIC, PROTECTED, PRIVATE, STATIC, ABSTRACT, FINAL, NATIVE, SYNCHRONIZED, STRICTFP, TRANSIENT, VOLATILE, DEFAULT, OPEN, TRANSITIVE,
|
||||
PACKAGE_LOCAL, SEALED, NON_SEALED, VALUE
|
||||
})
|
||||
@interface ModifierConstant { }
|
||||
}
|
||||
Reference in New Issue
Block a user