< prev index next >

src/hotspot/share/oops/klass.cpp

Print this page




 149 
 150 void Klass::initialize(TRAPS) {
 151   ShouldNotReachHere();
 152 }
 153 
 154 bool Klass::compute_is_subtype_of(Klass* k) {
 155   assert(k->is_klass(), "argument must be a class");
 156   return is_subclass_of(k);
 157 }
 158 
 159 Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
 160 #ifdef ASSERT
 161   tty->print_cr("Error: find_field called on a klass oop."
 162                 " Likely error: reflection method does not correctly"
 163                 " wrap return value in a mirror object.");
 164 #endif
 165   ShouldNotReachHere();
 166   return NULL;
 167 }
 168 
 169 Method* Klass::uncached_lookup_method(const Symbol* name, const Symbol* signature, OverpassLookupMode overpass_mode) const {


 170 #ifdef ASSERT
 171   tty->print_cr("Error: uncached_lookup_method called on a klass oop."
 172                 " Likely error: reflection method does not correctly"
 173                 " wrap return value in a mirror object.");
 174 #endif
 175   ShouldNotReachHere();
 176   return NULL;
 177 }
 178 
 179 void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
 180   return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD);
 181 }
 182 
 183 // "Normal" instantiation is preceeded by a MetaspaceObj allocation
 184 // which zeros out memory - calloc equivalent.
 185 // The constructor is also used from CppVtableCloner,
 186 // which doesn't zero out the memory before calling the constructor.
 187 // Need to set the _java_mirror field explicitly to not hit an assert that the field
 188 // should be NULL before setting it.
 189 Klass::Klass() : _prototype_header(markOopDesc::prototype()),




 149 
 150 void Klass::initialize(TRAPS) {
 151   ShouldNotReachHere();
 152 }
 153 
 154 bool Klass::compute_is_subtype_of(Klass* k) {
 155   assert(k->is_klass(), "argument must be a class");
 156   return is_subclass_of(k);
 157 }
 158 
 159 Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
 160 #ifdef ASSERT
 161   tty->print_cr("Error: find_field called on a klass oop."
 162                 " Likely error: reflection method does not correctly"
 163                 " wrap return value in a mirror object.");
 164 #endif
 165   ShouldNotReachHere();
 166   return NULL;
 167 }
 168 
 169 Method* Klass::uncached_lookup_method(const Symbol* name, const Symbol* signature,
 170                                       OverpassLookupMode overpass_mode,
 171                                       PrivateLookupMode private_mode) const {
 172 #ifdef ASSERT
 173   tty->print_cr("Error: uncached_lookup_method called on a klass oop."
 174                 " Likely error: reflection method does not correctly"
 175                 " wrap return value in a mirror object.");
 176 #endif
 177   ShouldNotReachHere();
 178   return NULL;
 179 }
 180 
 181 void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
 182   return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD);
 183 }
 184 
 185 // "Normal" instantiation is preceeded by a MetaspaceObj allocation
 186 // which zeros out memory - calloc equivalent.
 187 // The constructor is also used from CppVtableCloner,
 188 // which doesn't zero out the memory before calling the constructor.
 189 // Need to set the _java_mirror field explicitly to not hit an assert that the field
 190 // should be NULL before setting it.
 191 Klass::Klass() : _prototype_header(markOopDesc::prototype()),


< prev index next >