361 if (has_parameter_annotations()) offset++; |
361 if (has_parameter_annotations()) offset++; |
362 if (has_type_annotations()) offset++; |
362 if (has_type_annotations()) offset++; |
363 return (AnnotationArray**)constMethod_end() - offset; |
363 return (AnnotationArray**)constMethod_end() - offset; |
364 } |
364 } |
365 |
365 |
|
366 // copy annotations from 'cm' to 'this' |
|
367 void ConstMethod::copy_annotations_from(ConstMethod* cm) { |
|
368 if (cm->has_method_annotations()) { |
|
369 assert(has_method_annotations(), "should be allocated already"); |
|
370 set_method_annotations(cm->method_annotations()); |
|
371 } |
|
372 if (cm->has_parameter_annotations()) { |
|
373 assert(has_parameter_annotations(), "should be allocated already"); |
|
374 set_parameter_annotations(cm->parameter_annotations()); |
|
375 } |
|
376 if (cm->has_type_annotations()) { |
|
377 assert(has_type_annotations(), "should be allocated already"); |
|
378 set_type_annotations(cm->type_annotations()); |
|
379 } |
|
380 if (cm->has_default_annotations()) { |
|
381 assert(has_default_annotations(), "should be allocated already"); |
|
382 set_default_annotations(cm->default_annotations()); |
|
383 } |
|
384 } |
|
385 |
366 // Printing |
386 // Printing |
367 |
387 |
368 void ConstMethod::print_on(outputStream* st) const { |
388 void ConstMethod::print_on(outputStream* st) const { |
369 ResourceMark rm; |
389 ResourceMark rm; |
370 assert(is_constMethod(), "must be constMethod"); |
390 assert(is_constMethod(), "must be constMethod"); |