< prev index next >

src/hotspot/share/runtime/fieldDescriptor.hpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP
  26 #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP
  27 
  28 #include "oops/constantPool.hpp"


  29 #include "oops/symbol.hpp"
  30 #include "runtime/fieldType.hpp"
  31 #include "utilities/accessFlags.hpp"
  32 #include "utilities/constantTag.hpp"
  33 
  34 // A fieldDescriptor describes the attributes of a single field (instance or class variable).
  35 // It needs the class constant pool to work (because it only holds indices into the pool
  36 // rather than the actual info).
  37 
  38 class fieldDescriptor {
  39  private:
  40   AccessFlags         _access_flags;
  41   int                 _index; // the field index
  42   constantPoolHandle  _cp;
  43 
  44   // update the access_flags for the field in the klass
  45   void update_klass_field_access_flag() {
  46     InstanceKlass* ik = field_holder();
  47     ik->field(index())->set_access_flags(_access_flags.as_short());
  48   }




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP
  26 #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP
  27 
  28 #include "oops/constantPool.hpp"
  29 #include "oops/fieldInfo.hpp"
  30 #include "oops/instanceKlass.hpp"
  31 #include "oops/symbol.hpp"
  32 #include "runtime/fieldType.hpp"
  33 #include "utilities/accessFlags.hpp"
  34 #include "utilities/constantTag.hpp"
  35 
  36 // A fieldDescriptor describes the attributes of a single field (instance or class variable).
  37 // It needs the class constant pool to work (because it only holds indices into the pool
  38 // rather than the actual info).
  39 
  40 class fieldDescriptor {
  41  private:
  42   AccessFlags         _access_flags;
  43   int                 _index; // the field index
  44   constantPoolHandle  _cp;
  45 
  46   // update the access_flags for the field in the klass
  47   void update_klass_field_access_flag() {
  48     InstanceKlass* ik = field_holder();
  49     ik->field(index())->set_access_flags(_access_flags.as_short());
  50   }


< prev index next >