diff src/share/vm/classfile/javaClasses.hpp @ 7462:ade95d680b42

8004728: Add hotspot support for parameter reflection Summary: Add hotspot support for parameter reflection Reviewed-by: acorn, jrose, coleenp Contributed-by: eric.mccorkle@oracle.com
author coleenp
date Tue, 08 Jan 2013 14:01:36 -0500
parents 4daebd4cc1dd
children 989155e2d07a ed6154d7d259 b14da2e6f2dc
line wrap: on
line diff
--- a/src/share/vm/classfile/javaClasses.hpp	Mon Jan 07 15:32:51 2013 -0500
+++ b/src/share/vm/classfile/javaClasses.hpp	Tue Jan 08 14:01:36 2013 -0500
@@ -729,6 +729,37 @@
   friend class JavaClasses;
 };
 
+class java_lang_reflect_Parameter {
+ private:
+  // Note that to reduce dependencies on the JDK we compute these
+  // offsets at run-time.
+  static int name_offset;
+  static int modifiers_offset;
+  static int index_offset;
+  static int executable_offset;
+
+  static void compute_offsets();
+
+ public:
+  // Allocation
+  static Handle create(TRAPS);
+
+  // Accessors
+  static oop name(oop field);
+  static void set_name(oop field, oop value);
+
+  static int index(oop reflect);
+  static void set_index(oop reflect, int value);
+
+  static int modifiers(oop reflect);
+  static void set_modifiers(oop reflect, int value);
+
+  static oop executable(oop constructor);
+  static void set_executable(oop constructor, oop value);
+
+  friend class JavaClasses;
+};
+
 // Interface to sun.reflect.ConstantPool objects
 class sun_reflect_ConstantPool {
  private: