< prev index next >

src/hotspot/share/oops/klass.cpp

Print this page

693   return name()->as_klass_external_name();
694 }
695 
696 const char* Klass::signature_name() const {
697   if (name() == NULL)  return "<unknown>";
698   if (is_objArray_klass() && ObjArrayKlass::cast(this)->bottom_klass()->is_hidden()) {
699     size_t name_len = name()->utf8_length();
700     char* result = NEW_RESOURCE_ARRAY(char, name_len + 1);
701     name()->as_C_string(result, (int)name_len + 1);
702     for (int index = (int)name_len; index > 0; index--) {
703       if (result[index] == '+') {
704         result[index] = JVM_SIGNATURE_DOT;
705         break;
706       }
707     }
708     return result;
709   }
710   return name()->as_C_string();
711 }
712 


















713 const char* Klass::external_kind() const {
714   if (is_interface()) return "interface";
715   if (is_abstract()) return "abstract class";
716   return "class";
717 }
718 
719 // Unless overridden, jvmti_class_status has no flags set.
720 jint Klass::jvmti_class_status() const {
721   return 0;
722 }
723 
724 
725 // Printing
726 
727 void Klass::print_on(outputStream* st) const {
728   ResourceMark rm;
729   // print title
730   st->print("%s", internal_name());
731   print_address_on(st);
732   st->cr();

693   return name()->as_klass_external_name();
694 }
695 
696 const char* Klass::signature_name() const {
697   if (name() == NULL)  return "<unknown>";
698   if (is_objArray_klass() && ObjArrayKlass::cast(this)->bottom_klass()->is_hidden()) {
699     size_t name_len = name()->utf8_length();
700     char* result = NEW_RESOURCE_ARRAY(char, name_len + 1);
701     name()->as_C_string(result, (int)name_len + 1);
702     for (int index = (int)name_len; index > 0; index--) {
703       if (result[index] == '+') {
704         result[index] = JVM_SIGNATURE_DOT;
705         break;
706       }
707     }
708     return result;
709   }
710   return name()->as_C_string();
711 }
712 
713 size_t Klass::copy_disjoint(oop obj, HeapWord* to, size_t word_size) { 
714   Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(obj), to, word_size);
715   return word_size;
716 }
717 
718 size_t Klass::copy_conjoint(oop obj, HeapWord* to, size_t word_size) { 
719   Copy::aligned_conjoint_words(cast_from_oop<HeapWord*>(obj), to, word_size);
720   return word_size;
721 }
722 
723 size_t Klass::copy_disjoint_compact(oop obj, HeapWord* to) { 
724   return obj->copy_disjoint(to); 
725 }
726 
727 size_t Klass::copy_conjoint_compact(oop obj, HeapWord* to) { 
728   return obj->copy_conjoint(to); 
729 }
730 
731 const char* Klass::external_kind() const {
732   if (is_interface()) return "interface";
733   if (is_abstract()) return "abstract class";
734   return "class";
735 }
736 
737 // Unless overridden, jvmti_class_status has no flags set.
738 jint Klass::jvmti_class_status() const {
739   return 0;
740 }
741 
742 
743 // Printing
744 
745 void Klass::print_on(outputStream* st) const {
746   ResourceMark rm;
747   // print title
748   st->print("%s", internal_name());
749   print_address_on(st);
750   st->cr();
< prev index next >