Mercurial > hg > graal-compiler
diff src/share/vm/runtime/reflectionUtils.hpp @ 12269:da051ce490eb
Merge
author | adlertz |
---|---|
date | Thu, 19 Sep 2013 18:01:39 +0200 |
parents | b2e698d2276c |
children | ac9cb1d5a202 |
line wrap: on
line diff
--- a/src/share/vm/runtime/reflectionUtils.hpp Thu Sep 19 09:34:20 2013 +0200 +++ b/src/share/vm/runtime/reflectionUtils.hpp Thu Sep 19 18:01:39 2013 +0200 @@ -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> {