List of usage examples for org.aspectj.apache.bcel.generic ObjectType ObjectType
public ObjectType(String class_name)
From source file:org.caesarj.mixer.intern.ClassModifyingVisitor.java
License:Open Source License
public void visitLocalVariable(LocalVariable variable) { // Change the type of the local variable this if (variable.getName().equals("this")) { int index = variable.getSignatureIndex(); ConstantPool cp = variable.getConstantPool(); Constant newSignature = new ConstantUtf8(new ObjectType(newClassName).getSignature()); cp.setConstant(index, newSignature); }/*from w ww .ja v a2 s . co m*/ super.visitLocalVariable(variable); }
From source file:org.caesarj.mixer.intern.ClassModifyingVisitor.java
License:Open Source License
public void visitField(Field field) { // and of outer this if (field.getName().startsWith("this$")) { int index = field.getSignatureIndex(); ConstantPool cp = field.getConstantPool(); Constant newSignature = new ConstantUtf8(new ObjectType(newOuterClassName).getSignature()); cp.setConstant(index, newSignature); }/*from w ww . jav a 2 s .c o m*/ super.visitField(field); }