< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotModifiers.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 20,10 ***
--- 20,12 ---
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  package jdk.vm.ci.hotspot;
  
+ import jdk.internal.misc.PreviewFeatures;
+ 
  import static java.lang.reflect.Modifier.ABSTRACT;
  import static java.lang.reflect.Modifier.FINAL;
  import static java.lang.reflect.Modifier.INTERFACE;
  import static java.lang.reflect.Modifier.NATIVE;
  import static java.lang.reflect.Modifier.PRIVATE;

*** 51,11 ***
      public static final int BRIDGE     = config().jvmAccBridge;
      public static final int SYNTHETIC  = config().jvmAccSynthetic;
      // @formatter:on
  
      public static int jvmClassModifiers() {
!         return PUBLIC | FINAL | INTERFACE | ABSTRACT | ANNOTATION | ENUM | SYNTHETIC;
      }
  
      public static int jvmMethodModifiers() {
          return PUBLIC | PRIVATE | PROTECTED | STATIC | FINAL | SYNCHRONIZED | BRIDGE | VARARGS | NATIVE | ABSTRACT | STRICT | SYNTHETIC;
      }
--- 53,12 ---
      public static final int BRIDGE     = config().jvmAccBridge;
      public static final int SYNTHETIC  = config().jvmAccSynthetic;
      // @formatter:on
  
      public static int jvmClassModifiers() {
!         return PUBLIC | FINAL | INTERFACE | ABSTRACT | ANNOTATION | ENUM | SYNTHETIC |
+                 (PreviewFeatures.isEnabled() ? 0x0020 : 0); // ACC_IDENTITY temp constant to avoid preview dependency
      }
  
      public static int jvmMethodModifiers() {
          return PUBLIC | PRIVATE | PROTECTED | STATIC | FINAL | SYNCHRONIZED | BRIDGE | VARARGS | NATIVE | ABSTRACT | STRICT | SYNTHETIC;
      }
< prev index next >