Lines Matching refs:clazz
91 public void visitAnyConstant(Clazz clazz, Constant constant) {}
94 public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
106 if (!stringConstant.getString(clazz).equals(newName))
110 debug(clazz, stringConstant, referencedClass, referencedMember);
115 new ConstantPoolEditor((ProgramClass)clazz).addUtf8Constant(newName);
121 public void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
133 if (!fieldrefConstant.getName(clazz).equals(newName) ||
134 !fieldrefConstant.getType(clazz).equals(newType))
138 debug(clazz, fieldrefConstant, referencedClass, referencedMember);
143 new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType);
149 public void visitInterfaceMethodrefConstant(Clazz clazz, InterfaceMethodrefConstant interfaceMethodrefConstant)
161 if (!interfaceMethodrefConstant.getName(clazz).equals(newName) ||
162 !interfaceMethodrefConstant.getType(clazz).equals(newType))
166 debug(clazz, interfaceMethodrefConstant, referencedClass, referencedMember);
171 new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType);
180 clazz.constantPoolEntryAccept(interfaceMethodrefConstant.u2classIndex, this);
188 System.out.println(" Class file = "+clazz.getName());
190 System.out.println(" Ref method = "+interfaceMethodrefConstant.getName(clazz)+interfaceMethodrefConstant.getType(clazz));
195 ((ProgramClass)clazz).constantPool[this.constantIndex] =
205 public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant)
217 if (!methodrefConstant.getName(clazz).equals(newName) ||
218 !methodrefConstant.getType(clazz).equals(newType))
222 debug(clazz, methodrefConstant, referencedClass, referencedMember);
227 new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName, newType);
236 clazz.constantPoolEntryAccept(methodrefConstant.u2classIndex, this);
244 System.out.println(" Class file = "+clazz.getName());
246 System.out.println(" Ref method = "+methodrefConstant.getName(clazz)+methodrefConstant.getType(clazz));
251 ((ProgramClass)clazz).constantPool[this.constantIndex] =
261 public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
264 if (ClassUtil.isInternalArrayType(classConstant.getName(clazz)))
291 public void visitAnyAttribute(Clazz clazz, Attribute attribute) {}
294 public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
305 if (!enclosingMethodAttribute.getName(clazz).equals(newName) ||
306 !enclosingMethodAttribute.getType(clazz).equals(newType))
310 new ConstantPoolEditor((ProgramClass)clazz).addNameAndTypeConstant(newName,
317 public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
322 stackSizeUpdater.visitCodeAttribute(clazz, method, codeAttribute);
326 codeAttribute.attributesAccept(clazz, method, this);
330 public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute)
333 annotationsAttribute.annotationsAccept(clazz, this);
337 public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
340 parameterAnnotationsAttribute.annotationsAccept(clazz, method, this);
344 public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
347 annotationDefaultAttribute.defaultValueAccept(clazz, this);
353 public void visitAnnotation(Clazz clazz, Annotation annotation)
356 annotation.elementValuesAccept(clazz, this);
362 public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
364 fixElementValue(clazz, annotation, constantElementValue);
368 public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
370 fixElementValue(clazz, annotation, enumConstantElementValue);
374 public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
376 fixElementValue(clazz, annotation, classElementValue);
380 public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
382 fixElementValue(clazz, annotation, annotationElementValue);
385 annotationElementValue.annotationAccept(clazz, this);
389 public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
391 fixElementValue(clazz, annotation, arrayElementValue);
394 arrayElementValue.elementValuesAccept(clazz, annotation, this);
403 private void fixElementValue(Clazz clazz,
412 String methodName = elementValue.getMethodName(clazz);
419 new ConstantPoolEditor((ProgramClass)clazz).addUtf8Constant(newMethodName);
425 private void debug(Clazz clazz,
431 System.out.println(" ["+clazz.getName()+"]: String ["+
432 stringConstant.getString(clazz)+"] -> ["+
437 private void debug(Clazz clazz,
443 System.out.println(" ["+clazz.getName()+"]: ["+
444 refConstant.getClassName(clazz)+"."+refConstant.getName(clazz)+" "+refConstant.getType(clazz)+"] -> ["+