src/java.base/share/classes/jdk/internal/reflect/ConstantPool.java
changeset 51798 f55a4bc91ef4
parent 47216 71c04702a3d5
equal deleted inserted replaced
51797:3efead10e303 51798:f55a4bc91ef4
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package jdk.internal.reflect;
    26 package jdk.internal.reflect;
    27 
    27 
    28 import java.lang.reflect.*;
    28 import java.lang.reflect.*;
       
    29 import java.util.Set;
    29 
    30 
    30 /** Provides reflective access to the constant pools of classes.
    31 /** Provides reflective access to the constant pools of classes.
    31     Currently this is needed to provide reflective access to annotations
    32     Currently this is needed to provide reflective access to annotations
    32     but may be used by other internal subsystems in the future. */
    33     but may be used by other internal subsystems in the future. */
    33 
    34 
   102   //---------------------------------------------------------------------------
   103   //---------------------------------------------------------------------------
   103   // Internals only below this point
   104   // Internals only below this point
   104   //
   105   //
   105 
   106 
   106   static {
   107   static {
   107       Reflection.registerFieldsToFilter(ConstantPool.class, new String[] { "constantPoolOop" });
   108       Reflection.registerFieldsToFilter(ConstantPool.class, Set.of("constantPoolOop"));
   108   }
   109   }
   109 
   110 
   110   // HotSpot-internal constant pool object (set by the VM, name known to the VM)
   111   // HotSpot-internal constant pool object (set by the VM, name known to the VM)
   111   private Object constantPoolOop;
   112   private Object constantPoolOop;
   112 
   113