112 void write_local_variable_table_attribute(const methodHandle& method, u2 num_entries);
113 void write_local_variable_type_table_attribute(const methodHandle& method, u2 num_entries);
114 void write_stackmap_table_attribute(const methodHandle& method, int stackmap_table_len);
115 u2 inner_classes_attribute_length();
116 void write_inner_classes_attribute(int length);
117 void write_signature_attribute(u2 generic_signaure_index);
118 void write_attribute_name_index(const char* name);
119 void write_annotations_attribute(const char* attr_name, AnnotationArray* annos);
120 // With PreserveAllAnnotations option "runtime invisible" annotations
121 // (RuntimeInvisibleAnnotations/RuntimeInvisibleTypeAnnotations/RuntimeInvisibleParameterAnnotations)
122 // are considered "runtime visible" and ClassFileReconstituter writes them as
123 // RuntimeVisibleAnnotations/RuntimeVisibleTypeAnnotations/RuntimeVisibleParameterAnnotations.
124 // This helper method is for the corner case when "runtime visible" attribute name is not presents
125 // in the class constant pool and the annotations are written with fallback "runtime invisible" name.
126 void write_annotations_attribute(const char* attr_name, const char* fallback_attr_name, AnnotationArray* annos);
127 void write_bootstrapmethod_attribute();
128 void write_nest_host_attribute();
129 void write_nest_members_attribute();
130 void write_permitted_subclasses_attribute();
131 void write_record_attribute();
132
133 address writeable_address(size_t size);
134 void write_u1(u1 x);
135 void write_u2(u2 x);
136 void write_u4(u4 x);
137 void write_u8(u8 x);
138
139 public:
140 // Calls to this constructor must be proceeded by a ResourceMark
141 // and a HandleMark
142 JvmtiClassFileReconstituter(InstanceKlass* ik) :
143 JvmtiConstantPoolReconstituter(ik) {
144 _buffer_size = initial_buffer_size;
145 _buffer = _buffer_ptr = NEW_RESOURCE_ARRAY(u1, _buffer_size);
146 _thread = Thread::current();
147 write_class_file_format();
148 };
149
150 size_t class_file_size() { return _buffer_ptr - _buffer; }
151
|
112 void write_local_variable_table_attribute(const methodHandle& method, u2 num_entries);
113 void write_local_variable_type_table_attribute(const methodHandle& method, u2 num_entries);
114 void write_stackmap_table_attribute(const methodHandle& method, int stackmap_table_len);
115 u2 inner_classes_attribute_length();
116 void write_inner_classes_attribute(int length);
117 void write_signature_attribute(u2 generic_signaure_index);
118 void write_attribute_name_index(const char* name);
119 void write_annotations_attribute(const char* attr_name, AnnotationArray* annos);
120 // With PreserveAllAnnotations option "runtime invisible" annotations
121 // (RuntimeInvisibleAnnotations/RuntimeInvisibleTypeAnnotations/RuntimeInvisibleParameterAnnotations)
122 // are considered "runtime visible" and ClassFileReconstituter writes them as
123 // RuntimeVisibleAnnotations/RuntimeVisibleTypeAnnotations/RuntimeVisibleParameterAnnotations.
124 // This helper method is for the corner case when "runtime visible" attribute name is not presents
125 // in the class constant pool and the annotations are written with fallback "runtime invisible" name.
126 void write_annotations_attribute(const char* attr_name, const char* fallback_attr_name, AnnotationArray* annos);
127 void write_bootstrapmethod_attribute();
128 void write_nest_host_attribute();
129 void write_nest_members_attribute();
130 void write_permitted_subclasses_attribute();
131 void write_record_attribute();
132 void write_loadable_descriptors_attribute();
133
134 address writeable_address(size_t size);
135 void write_u1(u1 x);
136 void write_u2(u2 x);
137 void write_u4(u4 x);
138 void write_u8(u8 x);
139
140 public:
141 // Calls to this constructor must be proceeded by a ResourceMark
142 // and a HandleMark
143 JvmtiClassFileReconstituter(InstanceKlass* ik) :
144 JvmtiConstantPoolReconstituter(ik) {
145 _buffer_size = initial_buffer_size;
146 _buffer = _buffer_ptr = NEW_RESOURCE_ARRAY(u1, _buffer_size);
147 _thread = Thread::current();
148 write_class_file_format();
149 };
150
151 size_t class_file_size() { return _buffer_ptr - _buffer; }
152
|