44 // update the access_flags for the field in the klass 45 void update_klass_field_access_flag() { 46 InstanceKlass* ik = field_holder(); 47 ik->field(index())->set_access_flags(_access_flags.as_short()); 48 } 49 50 FieldInfo* field() const { 51 InstanceKlass* ik = field_holder(); 52 return ik->field(_index); 53 } 54 55 public: 56 fieldDescriptor() { 57 DEBUG_ONLY(_index = badInt); 58 } 59 fieldDescriptor(InstanceKlass* ik, int index) { 60 DEBUG_ONLY(_index = badInt); 61 reinitialize(ik, index); 62 } 63 Symbol* name() const { 64 return field()->name(_cp); 65 } 66 Symbol* signature() const { 67 return field()->signature(_cp); 68 } 69 InstanceKlass* field_holder() const { return _cp->pool_holder(); } 70 ConstantPool* constants() const { return _cp(); } 71 AccessFlags access_flags() const { return _access_flags; } 72 oop loader() const; 73 // Offset (in words) of field from start of instanceOop / Klass* 74 int offset() const { return field()->offset(); } 75 Symbol* generic_signature() const; 76 int index() const { return _index; } 77 AnnotationArray* annotations() const; 78 AnnotationArray* type_annotations() const; 79 80 // Initial field value 81 bool has_initial_value() const { return field()->initval_index() != 0; } 82 int initial_value_index() const { return field()->initval_index(); } 83 constantTag initial_value_tag() const; // The tag will return true on one of is_int(), is_long(), is_single(), is_double() 84 jint int_initial_value() const; 85 jlong long_initial_value() const; 86 jfloat float_initial_value() const; 87 jdouble double_initial_value() const; | 44 // update the access_flags for the field in the klass 45 void update_klass_field_access_flag() { 46 InstanceKlass* ik = field_holder(); 47 ik->field(index())->set_access_flags(_access_flags.as_short()); 48 } 49 50 FieldInfo* field() const { 51 InstanceKlass* ik = field_holder(); 52 return ik->field(_index); 53 } 54 55 public: 56 fieldDescriptor() { 57 DEBUG_ONLY(_index = badInt); 58 } 59 fieldDescriptor(InstanceKlass* ik, int index) { 60 DEBUG_ONLY(_index = badInt); 61 reinitialize(ik, index); 62 } 63 Symbol* name() const { 64 return field()->name(_cp()); 65 } 66 Symbol* signature() const { 67 return field()->signature(_cp()); 68 } 69 InstanceKlass* field_holder() const { return _cp->pool_holder(); } 70 ConstantPool* constants() const { return _cp(); } 71 AccessFlags access_flags() const { return _access_flags; } 72 oop loader() const; 73 // Offset (in words) of field from start of instanceOop / Klass* 74 int offset() const { return field()->offset(); } 75 Symbol* generic_signature() const; 76 int index() const { return _index; } 77 AnnotationArray* annotations() const; 78 AnnotationArray* type_annotations() const; 79 80 // Initial field value 81 bool has_initial_value() const { return field()->initval_index() != 0; } 82 int initial_value_index() const { return field()->initval_index(); } 83 constantTag initial_value_tag() const; // The tag will return true on one of is_int(), is_long(), is_single(), is_double() 84 jint int_initial_value() const; 85 jlong long_initial_value() const; 86 jfloat float_initial_value() const; 87 jdouble double_initial_value() const; |