comparison jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java @ 23750:b39b4a11c1d1

restore API - backward compatibilty support for Graal
author Doug Simon <doug.simon@oracle.com>
date Wed, 07 Sep 2016 16:45:44 +0200
parents d6bd0b9cd0b6
children
comparison
equal deleted inserted replaced
23749:d6bd0b9cd0b6 23750:b39b4a11c1d1
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package jdk.vm.ci.meta; 23 package jdk.vm.ci.meta;
24 24
25 import static java.lang.reflect.Modifier.FINAL;
25 import static java.lang.reflect.Modifier.PRIVATE; 26 import static java.lang.reflect.Modifier.PRIVATE;
26 import static java.lang.reflect.Modifier.PROTECTED; 27 import static java.lang.reflect.Modifier.PROTECTED;
27 import static java.lang.reflect.Modifier.PUBLIC; 28 import static java.lang.reflect.Modifier.PUBLIC;
29 import static java.lang.reflect.Modifier.STATIC;
30 import static java.lang.reflect.Modifier.TRANSIENT;
31 import static java.lang.reflect.Modifier.VOLATILE;
28 32
29 import java.lang.reflect.Modifier; 33 import java.lang.reflect.Modifier;
30 34
31 /** 35 /**
32 * A Java element (i.e., a class, interface, field or method) that is described by a set of Java 36 * A Java element (i.e., a class, interface, field or method) that is described by a set of Java
142 * @return whether the method is a concrete method 146 * @return whether the method is a concrete method
143 */ 147 */
144 default boolean isConcrete() { 148 default boolean isConcrete() {
145 return !isAbstract(); 149 return !isAbstract();
146 } 150 }
151
152 /**
153 * This is removed in JDK 9 and should not be used. It used to rely on use of reflection to read
154 * non-public values from {@link Modifier}. Such cross-module (i.e., {@code jdk.vm.ci} to
155 * {@code java.base}) reflection is disabled in 9 and will require a VM option such
156 * {@code --add-exports-private} to be enabled.
157 */
158 @Deprecated
159 static int jvmFieldModifiers() {
160 // Reflection replaced with hard coded values (which will not change in JDK 8).
161 final int accEnum = 0x4000;
162 final int accSynthethic = 0x1000;
163 return PUBLIC | PRIVATE | PROTECTED | STATIC | FINAL | VOLATILE | TRANSIENT | accEnum | accSynthethic;
164 }
165
147 } 166 }