hotspot/src/share/vm/runtime/signature.cpp
changeset 5421 e294db54fc0d
parent 1 489c9b5090e2
child 5426 470c15eda401
equal deleted inserted replaced
5420:586d3988e72b 5421:e294db54fc0d
   325 
   325 
   326   symbolOop result = oopFactory::new_symbol(_signature, begin, end, CHECK_NULL);
   326   symbolOop result = oopFactory::new_symbol(_signature, begin, end, CHECK_NULL);
   327   return result;
   327   return result;
   328 }
   328 }
   329 
   329 
       
   330 klassOop SignatureStream::as_klass(Handle class_loader, Handle protection_domain,
       
   331                                    FailureMode failure_mode, TRAPS) {
       
   332   if (!is_object())  return NULL;
       
   333   symbolOop name = as_symbol(CHECK_NULL);
       
   334   if (failure_mode == ReturnNull) {
       
   335     return SystemDictionary::resolve_or_null(name, class_loader, protection_domain, THREAD);
       
   336   } else {
       
   337     bool throw_error = (failure_mode == NCDFError);
       
   338     return SystemDictionary::resolve_or_fail(name, class_loader, protection_domain, throw_error, THREAD);
       
   339   }
       
   340 }
       
   341 
       
   342 oop SignatureStream::as_java_mirror(Handle class_loader, Handle protection_domain,
       
   343                                     FailureMode failure_mode, TRAPS) {
       
   344   if (!is_object())
       
   345     return Universe::java_mirror(type());
       
   346   klassOop klass = as_klass(class_loader, protection_domain, failure_mode, CHECK_NULL);
       
   347   if (klass == NULL)  return NULL;
       
   348   return Klass::cast(klass)->java_mirror();
       
   349 }
   330 
   350 
   331 symbolOop SignatureStream::as_symbol_or_null() {
   351 symbolOop SignatureStream::as_symbol_or_null() {
   332   // Create a symbol from for string _begin _end
   352   // Create a symbol from for string _begin _end
   333   ResourceMark rm;
   353   ResourceMark rm;
   334 
   354