310 case Boolean: 311 case Byte: 312 case Char: 313 case Short: 314 return false; 315 default: 316 return is_assignable_from(from, context, from_field_is_protected, CHECK_false); 317 } 318 } 319 } 320 321 VerificationType get_component(ClassVerifier* context, TRAPS) const; 322 323 int dimensions() const { 324 assert(is_array(), "Must be an array"); 325 int index = 0; 326 while (name()->byte_at(index) == '[') index++; 327 return index; 328 } 329 330 // checks if the class represented by 'this' is a nestmate of the 331 // cur class being verified 332 bool is_nestmate_of(InstanceKlass* cur, TRAPS) const; 333 334 void print_on(outputStream* st) const; 335 336 private: 337 338 bool is_reference_assignable_from( 339 const VerificationType&, ClassVerifier*, bool from_field_is_protected, 340 TRAPS) const; 341 342 public: 343 static bool resolve_and_check_assignability(InstanceKlass* klass, Symbol* name, 344 Symbol* from_name, bool from_field_is_protected, 345 bool from_is_array, bool from_is_object, 346 TRAPS); 347 }; 348 349 #endif // SHARE_VM_CLASSFILE_VERIFICATIONTYPE_HPP | 310 case Boolean: 311 case Byte: 312 case Char: 313 case Short: 314 return false; 315 default: 316 return is_assignable_from(from, context, from_field_is_protected, CHECK_false); 317 } 318 } 319 } 320 321 VerificationType get_component(ClassVerifier* context, TRAPS) const; 322 323 int dimensions() const { 324 assert(is_array(), "Must be an array"); 325 int index = 0; 326 while (name()->byte_at(index) == '[') index++; 327 return index; 328 } 329 330 void print_on(outputStream* st) const; 331 332 private: 333 334 bool is_reference_assignable_from( 335 const VerificationType&, ClassVerifier*, bool from_field_is_protected, 336 TRAPS) const; 337 338 public: 339 static bool resolve_and_check_assignability(InstanceKlass* klass, Symbol* name, 340 Symbol* from_name, bool from_field_is_protected, 341 bool from_is_array, bool from_is_object, 342 TRAPS); 343 }; 344 345 #endif // SHARE_VM_CLASSFILE_VERIFICATIONTYPE_HPP |