220
221 /**
222 * Sets this item to an item that do not hold a primitive value.
223 *
224 * @param type
225 * the type of this item.
226 * @param strVal1
227 * first part of the value of this item.
228 * @param strVal2
229 * second part of the value of this item.
230 * @param strVal3
231 * third part of the value of this item.
232 */
233 void set(final int type, final String strVal1, final String strVal2,
234 final String strVal3) {
235 this.type = type;
236 this.strVal1 = strVal1;
237 this.strVal2 = strVal2;
238 this.strVal3 = strVal3;
239 switch (type) {
240 case ClassWriter.UTF8:
241 case ClassWriter.STR:
242 case ClassWriter.CLASS:
243 case ClassWriter.MTYPE:
244 case ClassWriter.TYPE_NORMAL:
245 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
246 return;
247 case ClassWriter.NAME_TYPE: {
248 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
249 * strVal2.hashCode());
250 return;
251 }
252 // ClassWriter.FIELD:
253 // ClassWriter.METH:
254 // ClassWriter.IMETH:
255 // ClassWriter.HANDLE_BASE + 1..9
256 default:
257 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
258 * strVal2.hashCode() * strVal3.hashCode());
259 }
260 }
261
262 /**
|
220
221 /**
222 * Sets this item to an item that do not hold a primitive value.
223 *
224 * @param type
225 * the type of this item.
226 * @param strVal1
227 * first part of the value of this item.
228 * @param strVal2
229 * second part of the value of this item.
230 * @param strVal3
231 * third part of the value of this item.
232 */
233 void set(final int type, final String strVal1, final String strVal2,
234 final String strVal3) {
235 this.type = type;
236 this.strVal1 = strVal1;
237 this.strVal2 = strVal2;
238 this.strVal3 = strVal3;
239 switch (type) {
240 case ClassWriter.CLASS:
241 this.intVal = 0; // intVal of a class must be zero, see visitInnerClass
242 case ClassWriter.UTF8:
243 case ClassWriter.STR:
244 case ClassWriter.MTYPE:
245 case ClassWriter.TYPE_NORMAL:
246 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
247 return;
248 case ClassWriter.NAME_TYPE: {
249 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
250 * strVal2.hashCode());
251 return;
252 }
253 // ClassWriter.FIELD:
254 // ClassWriter.METH:
255 // ClassWriter.IMETH:
256 // ClassWriter.HANDLE_BASE + 1..9
257 default:
258 hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()
259 * strVal2.hashCode() * strVal3.hashCode());
260 }
261 }
262
263 /**
|