< prev index next >

src/share/vm/classfile/moduleEntry.cpp

Print this page




  37 #include "utilities/growableArray.hpp"
  38 #include "utilities/hashtable.inline.hpp"
  39 #include "utilities/ostream.hpp"
  40 
  41 ModuleEntry* ModuleEntryTable::_javabase_module = NULL;
  42 
  43 void ModuleEntry::set_location(Symbol* location) {
  44   if (_location != NULL) {
  45     // _location symbol's refcounts are managed by ModuleEntry,
  46     // must decrement the old one before updating.
  47     _location->decrement_refcount();
  48   }
  49 
  50   _location = location;
  51 
  52   if (location != NULL) {
  53     location->increment_refcount();
  54   }
  55 }
  56 











  57 void ModuleEntry::set_version(Symbol* version) {
  58   if (_version != NULL) {
  59     // _version symbol's refcounts are managed by ModuleEntry,
  60     // must decrement the old one before updating.
  61     _version->decrement_refcount();
  62   }
  63 
  64   _version = version;
  65 
  66   if (version != NULL) {
  67     version->increment_refcount();
  68   }
  69 }
  70 
  71 // Returns the shared ProtectionDomain
  72 Handle ModuleEntry::shared_protection_domain() {
  73   return Handle(JNIHandles::resolve(_pd));
  74 }
  75 
  76 // Set the shared ProtectionDomain atomically




  37 #include "utilities/growableArray.hpp"
  38 #include "utilities/hashtable.inline.hpp"
  39 #include "utilities/ostream.hpp"
  40 
  41 ModuleEntry* ModuleEntryTable::_javabase_module = NULL;
  42 
  43 void ModuleEntry::set_location(Symbol* location) {
  44   if (_location != NULL) {
  45     // _location symbol's refcounts are managed by ModuleEntry,
  46     // must decrement the old one before updating.
  47     _location->decrement_refcount();
  48   }
  49 
  50   _location = location;
  51 
  52   if (location != NULL) {
  53     location->increment_refcount();
  54   }
  55 }
  56 
  57 bool ModuleEntry::is_non_jdk_module() {
  58   ResourceMark rm;
  59   if (location() != NULL) {
  60     const char* loc = location()->as_C_string();
  61     if (strncmp(loc, "jrt:/java.", 10) != 0 && strncmp(loc, "jrt:/jdk.", 9) != 0) {
  62       return true;
  63     }
  64   }
  65   return false;
  66 }
  67 
  68 void ModuleEntry::set_version(Symbol* version) {
  69   if (_version != NULL) {
  70     // _version symbol's refcounts are managed by ModuleEntry,
  71     // must decrement the old one before updating.
  72     _version->decrement_refcount();
  73   }
  74 
  75   _version = version;
  76 
  77   if (version != NULL) {
  78     version->increment_refcount();
  79   }
  80 }
  81 
  82 // Returns the shared ProtectionDomain
  83 Handle ModuleEntry::shared_protection_domain() {
  84   return Handle(JNIHandles::resolve(_pd));
  85 }
  86 
  87 // Set the shared ProtectionDomain atomically


< prev index next >