diff src/share/vm/runtime/reflectionUtils.hpp @ 12264:b2e698d2276c

8014013: CallInfo structure no longer accurately reports the result of a LinkResolver operation Summary: Enhance method resolution and resulting data structures, plus some refactoring. Reviewed-by: twisti, acorn, jrose
author drchase
date Fri, 13 Sep 2013 22:38:02 -0400
parents f9be75d21404
children ac9cb1d5a202
line wrap: on
line diff
--- a/src/share/vm/runtime/reflectionUtils.hpp	Tue Sep 17 23:12:27 2013 +0200
+++ b/src/share/vm/runtime/reflectionUtils.hpp	Fri Sep 13 22:38:02 2013 -0400
@@ -109,6 +109,8 @@
  private:
   int length() const                { return _klass->java_fields_count(); }
 
+  fieldDescriptor _fd_buf;
+
  public:
   FieldStream(instanceKlassHandle klass, bool local_only, bool classes_only)
     : KlassStream(klass, local_only, classes_only) {
@@ -134,6 +136,12 @@
   int offset() const {
     return _klass->field_offset( index() );
   }
+  // bridge to a heavier API:
+  fieldDescriptor& field_descriptor() const {
+    fieldDescriptor& field = const_cast<fieldDescriptor&>(_fd_buf);
+    field.reinitialize(_klass(), _index);
+    return field;
+  }
 };
 
 class FilteredField : public CHeapObj<mtInternal>  {