Example usage for org.aspectj.apache.bcel.classfile LocalVariable getSignatureIndex

List of usage examples for org.aspectj.apache.bcel.classfile LocalVariable getSignatureIndex

Introduction

In this page you can find the example usage for org.aspectj.apache.bcel.classfile LocalVariable getSignatureIndex.

Prototype

public final int getSignatureIndex() 

Source Link

Usage

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);
    }//  www .j a  va2 s . co m
    super.visitLocalVariable(variable);
}