< prev index next >

src/hotspot/share/classfile/moduleEntry.hpp

Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com
   1 /*
   2  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   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  *


  93   }
  94 
  95   Symbol*          name() const                        { return literal(); }
  96   void             set_name(Symbol* n)                 { set_literal(n); }
  97 
  98   oop              module() const;
  99   OopHandle        module_handle() const               { return _module; }
 100   void             set_module(OopHandle j)             { _module = j; }
 101 
 102   // The shared ProtectionDomain reference is set once the VM loads a shared class
 103   // originated from the current Module. The referenced ProtectionDomain object is
 104   // created by the ClassLoader when loading a class (shared or non-shared) from the
 105   // Module for the first time. This ProtectionDomain object is used for all
 106   // classes from the Module loaded by the same ClassLoader.
 107   oop              shared_protection_domain();
 108   void             set_shared_protection_domain(ClassLoaderData *loader_data, Handle pd);
 109 
 110   ClassLoaderData* loader_data() const                 { return _loader_data; }
 111 
 112   void set_loader_data(ClassLoaderData* cld) {
 113     assert(!cld->is_unsafe_anonymous(), "Unexpected unsafe anonymous class loader data");
 114     _loader_data = cld;
 115   }
 116 
 117   Symbol*          version() const                     { return _version; }
 118   void             set_version(Symbol* version);
 119 
 120   Symbol*          location() const                    { return _location; }
 121   void             set_location(Symbol* location);
 122   bool             should_show_version();
 123 
 124   bool             can_read(ModuleEntry* m) const;
 125   bool             has_reads_list() const;
 126   void             add_read(ModuleEntry* m);
 127   void             set_read_walk_required(ClassLoaderData* m_loader_data);
 128 
 129   bool             is_open() const                     { return _is_open; }
 130   void             set_is_open(bool is_open);
 131 
 132   bool             is_named() const                    { return (name() != NULL); }
 133 


   1 /*
   2  * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   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  *


  93   }
  94 
  95   Symbol*          name() const                        { return literal(); }
  96   void             set_name(Symbol* n)                 { set_literal(n); }
  97 
  98   oop              module() const;
  99   OopHandle        module_handle() const               { return _module; }
 100   void             set_module(OopHandle j)             { _module = j; }
 101 
 102   // The shared ProtectionDomain reference is set once the VM loads a shared class
 103   // originated from the current Module. The referenced ProtectionDomain object is
 104   // created by the ClassLoader when loading a class (shared or non-shared) from the
 105   // Module for the first time. This ProtectionDomain object is used for all
 106   // classes from the Module loaded by the same ClassLoader.
 107   oop              shared_protection_domain();
 108   void             set_shared_protection_domain(ClassLoaderData *loader_data, Handle pd);
 109 
 110   ClassLoaderData* loader_data() const                 { return _loader_data; }
 111 
 112   void set_loader_data(ClassLoaderData* cld) {
 113     assert(!cld->has_class_mirror_holder(), "Unexpected has_class_mirror_holder cld");
 114     _loader_data = cld;
 115   }
 116 
 117   Symbol*          version() const                     { return _version; }
 118   void             set_version(Symbol* version);
 119 
 120   Symbol*          location() const                    { return _location; }
 121   void             set_location(Symbol* location);
 122   bool             should_show_version();
 123 
 124   bool             can_read(ModuleEntry* m) const;
 125   bool             has_reads_list() const;
 126   void             add_read(ModuleEntry* m);
 127   void             set_read_walk_required(ClassLoaderData* m_loader_data);
 128 
 129   bool             is_open() const                     { return _is_open; }
 130   void             set_is_open(bool is_open);
 131 
 132   bool             is_named() const                    { return (name() != NULL); }
 133 


< prev index next >