hotspot/src/share/vm/classfile/classLoaderData.cpp
changeset 22905 4b1549d69106
parent 22900 e699fc9dc806
parent 22794 f1c014ad3754
child 23526 6851d341ad52
equal deleted inserted replaced
22904:ed968158d053 22905:4b1549d69106
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2014, 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.
     7  * published by the Free Software Foundation.
   526     k->verify();
   526     k->verify();
   527     assert(k != k->next_link(), "no loops!");
   527     assert(k != k->next_link(), "no loops!");
   528   }
   528   }
   529 }
   529 }
   530 
   530 
       
   531 bool ClassLoaderData::contains_klass(Klass* klass) {
       
   532   for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
       
   533     if (k == klass) return true;
       
   534   }
       
   535   return false;
       
   536 }
       
   537 
   531 
   538 
   532 // GC root of class loader data created.
   539 // GC root of class loader data created.
   533 ClassLoaderData* ClassLoaderDataGraph::_head = NULL;
   540 ClassLoaderData* ClassLoaderDataGraph::_head = NULL;
   534 ClassLoaderData* ClassLoaderDataGraph::_unloading = NULL;
   541 ClassLoaderData* ClassLoaderDataGraph::_unloading = NULL;
   535 ClassLoaderData* ClassLoaderDataGraph::_saved_head = NULL;
   542 ClassLoaderData* ClassLoaderDataGraph::_saved_head = NULL;