2253 // The field is called ConstantPool* in the sun.reflect.ConstantPool class. |
2253 // The field is called ConstantPool* in the sun.reflect.ConstantPool class. |
2254 compute_offset(_oop_offset, k, vmSymbols::ConstantPool_name(), vmSymbols::object_signature()); |
2254 compute_offset(_oop_offset, k, vmSymbols::ConstantPool_name(), vmSymbols::object_signature()); |
2255 } |
2255 } |
2256 } |
2256 } |
2257 |
2257 |
|
2258 void java_lang_reflect_Parameter::compute_offsets() { |
|
2259 Klass* k = SystemDictionary::reflect_Parameter_klass(); |
|
2260 if(NULL != k) { |
|
2261 compute_offset(name_offset, k, vmSymbols::name_name(), vmSymbols::string_signature()); |
|
2262 compute_offset(modifiers_offset, k, vmSymbols::modifiers_name(), vmSymbols::int_signature()); |
|
2263 compute_offset(index_offset, k, vmSymbols::index_name(), vmSymbols::int_signature()); |
|
2264 compute_offset(executable_offset, k, vmSymbols::executable_name(), vmSymbols::executable_signature()); |
|
2265 } |
|
2266 } |
|
2267 |
|
2268 Handle java_lang_reflect_Parameter::create(TRAPS) { |
|
2269 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2270 Symbol* name = vmSymbols::java_lang_reflect_Parameter(); |
|
2271 Klass* k = SystemDictionary::resolve_or_fail(name, true, CHECK_NH); |
|
2272 instanceKlassHandle klass (THREAD, k); |
|
2273 // Ensure it is initialized |
|
2274 klass->initialize(CHECK_NH); |
|
2275 return klass->allocate_instance_handle(CHECK_NH); |
|
2276 } |
|
2277 |
|
2278 oop java_lang_reflect_Parameter::name(oop param) { |
|
2279 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2280 return param->obj_field(name_offset); |
|
2281 } |
|
2282 |
|
2283 void java_lang_reflect_Parameter::set_name(oop param, oop value) { |
|
2284 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2285 param->obj_field_put(name_offset, value); |
|
2286 } |
|
2287 |
|
2288 int java_lang_reflect_Parameter::modifiers(oop param) { |
|
2289 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2290 return param->int_field(modifiers_offset); |
|
2291 } |
|
2292 |
|
2293 void java_lang_reflect_Parameter::set_modifiers(oop param, int value) { |
|
2294 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2295 param->int_field_put(modifiers_offset, value); |
|
2296 } |
|
2297 |
|
2298 int java_lang_reflect_Parameter::index(oop param) { |
|
2299 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2300 return param->int_field(index_offset); |
|
2301 } |
|
2302 |
|
2303 void java_lang_reflect_Parameter::set_index(oop param, int value) { |
|
2304 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2305 param->int_field_put(index_offset, value); |
|
2306 } |
|
2307 |
|
2308 oop java_lang_reflect_Parameter::executable(oop param) { |
|
2309 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2310 return param->obj_field(executable_offset); |
|
2311 } |
|
2312 |
|
2313 void java_lang_reflect_Parameter::set_executable(oop param, oop value) { |
|
2314 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
|
2315 param->obj_field_put(executable_offset, value); |
|
2316 } |
|
2317 |
2258 |
2318 |
2259 Handle sun_reflect_ConstantPool::create(TRAPS) { |
2319 Handle sun_reflect_ConstantPool::create(TRAPS) { |
2260 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
2320 assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem"); |
2261 Klass* k = SystemDictionary::reflect_ConstantPool_klass(); |
2321 Klass* k = SystemDictionary::reflect_ConstantPool_klass(); |
2262 instanceKlassHandle klass (THREAD, k); |
2322 instanceKlassHandle klass (THREAD, k); |
2926 int java_lang_reflect_Field::slot_offset; |
2986 int java_lang_reflect_Field::slot_offset; |
2927 int java_lang_reflect_Field::modifiers_offset; |
2987 int java_lang_reflect_Field::modifiers_offset; |
2928 int java_lang_reflect_Field::signature_offset; |
2988 int java_lang_reflect_Field::signature_offset; |
2929 int java_lang_reflect_Field::annotations_offset; |
2989 int java_lang_reflect_Field::annotations_offset; |
2930 int java_lang_reflect_Field::type_annotations_offset; |
2990 int java_lang_reflect_Field::type_annotations_offset; |
|
2991 int java_lang_reflect_Parameter::name_offset; |
|
2992 int java_lang_reflect_Parameter::modifiers_offset; |
|
2993 int java_lang_reflect_Parameter::index_offset; |
|
2994 int java_lang_reflect_Parameter::executable_offset; |
2931 int java_lang_boxing_object::value_offset; |
2995 int java_lang_boxing_object::value_offset; |
2932 int java_lang_boxing_object::long_value_offset; |
2996 int java_lang_boxing_object::long_value_offset; |
2933 int java_lang_ref_Reference::referent_offset; |
2997 int java_lang_ref_Reference::referent_offset; |
2934 int java_lang_ref_Reference::queue_offset; |
2998 int java_lang_ref_Reference::queue_offset; |
2935 int java_lang_ref_Reference::next_offset; |
2999 int java_lang_ref_Reference::next_offset; |