Commit c72a86bd authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Rename V_PREVIEW into V_PREVIEW_EXPERIMENTAL, and deprecate it.

parent fba2e218
...@@ -242,7 +242,7 @@ public abstract class ClassVisitor { ...@@ -242,7 +242,7 @@ public abstract class ClassVisitor {
* @param nestMember the internal name of a nest member. * @param nestMember the internal name of a nest member.
* @deprecated This API is experimental. * @deprecated This API is experimental.
*/ */
@Deprecated() @Deprecated
public void visitNestMemberExperimental(final String nestMember) { public void visitNestMemberExperimental(final String nestMember) {
if (api < Opcodes.ASM7_EXPERIMENTAL) { if (api < Opcodes.ASM7_EXPERIMENTAL) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
......
...@@ -73,10 +73,12 @@ public interface Opcodes { ...@@ -73,10 +73,12 @@ public interface Opcodes {
/** /**
* Version flag indicating that the class is using 'preview' features. * Version flag indicating that the class is using 'preview' features.
* *
* <p>{@code version & V_PREVIEW == V_PREVIEW} tests if a version is flagged with {@code * <p>{@code version & V_PREVIEW_EXPERIMENTAL == V_PREVIEW_EXPERIMENTAL} tests if a version is
* V_PREVIEW}. * flagged with {@code V_PREVIEW_EXPERIMENTAL}.
*
* @deprecated This API is experimental.
*/ */
int V_PREVIEW = 0xFFFF0000; @Deprecated int V_PREVIEW_EXPERIMENTAL = 0xFFFF0000;
// Access flags values, defined in // Access flags values, defined in
// - https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1 // - https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1
......
...@@ -441,7 +441,8 @@ public class ClassReaderTest extends AsmTest implements Opcodes { ...@@ -441,7 +441,8 @@ public class ClassReaderTest extends AsmTest implements Opcodes {
String signature, String signature,
String superName, String superName,
String[] interfaces) { String[] interfaces) {
assertTrue((version & Opcodes.V_PREVIEW) == Opcodes.V_PREVIEW); assertTrue(
(version & Opcodes.V_PREVIEW_EXPERIMENTAL) == Opcodes.V_PREVIEW_EXPERIMENTAL);
} }
}, },
0); 0);
......
...@@ -67,7 +67,7 @@ public class ConstantsTest { ...@@ -67,7 +67,7 @@ public class ConstantsTest {
assertFalse(asmVersions.contains(field.getInt(null))); assertFalse(asmVersions.contains(field.getInt(null)));
asmVersions.add(field.getInt(null)); asmVersions.add(field.getInt(null));
break; break;
case "V_PREVIEW": case "V_PREVIEW_EXPERIMENTAL":
case "V1_1": case "V1_1":
case "V1_2": case "V1_2":
case "V1_3": case "V1_3":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment