< prev index next >

src/hotspot/share/runtime/reflectionUtils.hpp

Print this page




  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_REFLECTIONUTILS_HPP
  26 #define SHARE_VM_RUNTIME_REFLECTIONUTILS_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "oops/instanceKlass.hpp"
  30 #include "oops/objArrayOop.hpp"
  31 #include "oops/oopsHierarchy.hpp"
  32 #include "runtime/handles.inline.hpp"
  33 #include "runtime/reflection.hpp"
  34 #include "utilities/accessFlags.hpp"
  35 #include "utilities/globalDefinitions.hpp"

  36 
  37 // A KlassStream is an abstract stream for streaming over self, superclasses
  38 // and (super)interfaces. Streaming is done in reverse order (subclasses first,
  39 // interfaces last).
  40 //
  41 //    for (KlassStream st(k, false, false, false); !st.eos(); st.next()) {
  42 //      Klass* k = st.klass();
  43 //      ...
  44 //    }
  45 
  46 class KlassStream VALUE_OBJ_CLASS_SPEC {
  47  protected:
  48   InstanceKlass*      _klass;           // current klass/interface iterated over
  49   InstanceKlass*      _base_klass;      // initial klass/interface to iterate over
  50   Array<Klass*>*      _interfaces;      // transitive interfaces for initial class
  51   int                 _interface_index; // current interface being processed
  52   bool                _local_only;      // process initial class/interface only
  53   bool                _classes_only;    // process classes only (no interfaces)
  54   bool                _walk_defaults;   // process default methods
  55   bool                _base_class_search_defaults; // time to process default methods




  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_REFLECTIONUTILS_HPP
  26 #define SHARE_VM_RUNTIME_REFLECTIONUTILS_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "oops/instanceKlass.hpp"
  30 #include "oops/objArrayOop.hpp"
  31 #include "oops/oopsHierarchy.hpp"
  32 #include "runtime/handles.hpp"
  33 #include "runtime/reflection.hpp"
  34 #include "utilities/accessFlags.hpp"
  35 #include "utilities/globalDefinitions.hpp"
  36 #include "utilities/growableArray.hpp"
  37 
  38 // A KlassStream is an abstract stream for streaming over self, superclasses
  39 // and (super)interfaces. Streaming is done in reverse order (subclasses first,
  40 // interfaces last).
  41 //
  42 //    for (KlassStream st(k, false, false, false); !st.eos(); st.next()) {
  43 //      Klass* k = st.klass();
  44 //      ...
  45 //    }
  46 
  47 class KlassStream VALUE_OBJ_CLASS_SPEC {
  48  protected:
  49   InstanceKlass*      _klass;           // current klass/interface iterated over
  50   InstanceKlass*      _base_klass;      // initial klass/interface to iterate over
  51   Array<Klass*>*      _interfaces;      // transitive interfaces for initial class
  52   int                 _interface_index; // current interface being processed
  53   bool                _local_only;      // process initial class/interface only
  54   bool                _classes_only;    // process classes only (no interfaces)
  55   bool                _walk_defaults;   // process default methods
  56   bool                _base_class_search_defaults; // time to process default methods


< prev index next >