Home | History | Annotate | Download | only in sun

Lines Matching refs:in

5  * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
114 * Will generate the bytes for a class extending the type passed in parameter. This class will
125 DataOutputStream in = null;
128 in = new DataOutputStream(bIn);
130 in.write(MAGIC);
131 in.write(VERSION);
132 in.writeShort(CONSTANT_POOL_COUNT);
137 in.writeByte(CONSTANT_Class);
138 in.writeShort(INDEX_UTF8_INSTANTIATOR_CLASS);
141 in.writeByte(CONSTANT_Class);
142 in.writeShort(INDEX_UTF8_SUPERCLASS);
145 in.writeByte(CONSTANT_Utf8);
146 in.writeUTF(CONSTRUCTOR_NAME);
149 in.writeByte(CONSTANT_Utf8);
150 in.writeUTF(CONSTRUCTOR_DESC);
153 in.writeByte(CONSTANT_Utf8);
154 in.writeUTF("Code");
157 in.writeByte(CONSTANT_Utf8);
158 in.writeUTF("L" + clazz + ";");
161 in.writeByte(CONSTANT_Utf8);
162 in.writeUTF(clazz);
165 in.writeByte(CONSTANT_Utf8);
166 // in.writeUTF("java/lang/Object");
167 in.writeUTF("sun/reflect/MagicAccessorImpl");
170 in.writeByte(CONSTANT_Class);
171 in.writeShort(INDEX_UTF8_INTERFACE);
174 in.writeByte(CONSTANT_Utf8);
175 in.writeUTF(ObjectInstantiator.class.getName().replace('.', '/'));
178 in.writeByte(CONSTANT_Utf8);
179 in.writeUTF("newInstance");
182 in.writeByte(CONSTANT_Utf8);
183 in.writeUTF("()Ljava/lang/Object;");
186 in.writeByte(CONSTANT_Methodref);
187 in.writeShort(INDEX_CLASS_OBJECT);
188 in.writeShort(INDEX_NAMEANDTYPE_DEFAULT_CONSTRUCTOR);
191 in.writeByte(CONSTANT_Class);
192 in.writeShort(INDEX_UTF8_OBJECT);
195 in.writeByte(CONSTANT_Utf8);
196 in.writeUTF("java/lang/Object");
199 in.writeByte(CONSTANT_NameAndType);
200 in.writeShort(INDEX_UTF8_CONSTRUCTOR_NAME);
201 in.writeShort(INDEX_UTF8_CONSTRUCTOR_DESC);
204 in.writeByte(CONSTANT_Class);
205 in.writeShort(INDEX_UTF8_TYPE);
208 in.writeByte(CONSTANT_Utf8);
209 in.writeUTF(classNameToInternalClassName(type.getName()));
214 in.writeShort(ACC_PUBLIC | ACC_SUPER | ACC_FINAL);
216 // this class index in the constant pool
217 in.writeShort(INDEX_CLASS_THIS);
219 // super class index in the constant pool
220 in.writeShort(INDEX_CLASS_SUPERCLASS);
223 in.writeShort(1);
224 in.writeShort(INDEX_CLASS_INTERFACE);
227 in.writeShort(0);
230 in.writeShort(2);
233 in.writeShort(ACC_PUBLIC);
234 in.writeShort(INDEX_UTF8_CONSTRUCTOR_NAME); // index of the method name (<init>)
235 in.writeShort(INDEX_UTF8_CONSTRUCTOR_DESC); // index of the description
236 in.writeShort(1); // number of attributes: only one, the code
239 in.writeShort(INDEX_UTF8_CODE_ATTRIBUTE);
240 in.writeInt(CONSTRUCTOR_CODE_ATTRIBUTE_LENGTH); // attribute length
241 in.writeShort(0); // max_stack
242 in.writeShort(1); // max_locals
243 in.writeInt(CONSTRUCTOR_CODE.length); // code length
244 in.write(CONSTRUCTOR_CODE);
245 in.writeShort(0); // exception_table_length = 0
246 in.writeShort(0); // attributes count = 0, no need to have LineNumberTable and LocalVariableTable
249 in.writeShort(ACC_PUBLIC);
250 in.writeShort(INDEX_UTF8_NEWINSTANCE_NAME); // index of the method name (newInstance)
251 in.writeShort(INDEX_UTF8_NEWINSTANCE_DESC); // index of the description
252 in.writeShort(1); // number of attributes: only one, the code
255 in.writeShort(INDEX_UTF8_CODE_ATTRIBUTE);
256 in.writeInt(NEWINSTANCE_CODE_ATTRIBUTE_LENGTH); // attribute length
257 in.writeShort(2); // max_stack
258 in.writeShort(1); // max_locals
259 in.writeInt(NEWINSTANCE_CODE.length); // code length
260 in.write(NEWINSTANCE_CODE);
261 in.writeShort(0); // exception_table_length = 0
262 in.writeShort(0); // attributes count = 0, no need to have LineNumberTable and LocalVariableTable
265 in.writeShort(0); // none. No need to have a source file attribute
270 if(in != null) {
272 in.close();