< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java

Print this page

        

*** 20,32 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package jdk.vm.ci.meta; - import java.lang.reflect.Field; - import java.lang.reflect.Modifier; - /** * Miscellaneous collection of utility methods used by {@code jdk.vm.ci.meta} and its clients. */ public class MetaUtil { --- 20,29 ----
*** 224,242 **** if (obj == null) { return "null"; } return obj.getClass().getName() + "@" + System.identityHashCode(obj); } - - /** - * Used to lookup constants from {@link Modifier} that are not public (VARARGS, SYNTHETIC etc.). - */ - static int getNonPublicModifierStaticField(String name) { - try { - Field field = Modifier.class.getDeclaredField(name); - field.setAccessible(true); - return field.getInt(null); - } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { - throw new InternalError(e); - } - } } --- 221,226 ----
< prev index next >