Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package cn.wensiqun.visitor.invoker;
 
 import java.util.List;
 import java.util.Map;
 
 import  org.objectweb.asm.Label;
 import  org.objectweb.asm.commons.EmptyVisitor;
 
fetch info(such as : start line number, desc, name and so on) for method local variable
public class LocalVariableInfoFetchVisitor extends EmptyVisitor {

current label line number
	protected int lineNumber;

line number for each label
	protected Map<Label, IntegerlabelLineMap = new HashMap<Label, Integer>();


Parameters:
varSigns
		this. = varSigns;
	}
	public void visitLabel(Label label) {
		.put(label++);
	}
	public void visitLocalVariable(String nameString desc,
			String signature, Label start, Label endint index) {
		sign.setName(name);
		sign.setDesc(desc);
		sign.setSignature(signature);
		sign.setStartLine(.get(start));
		sign.setEndLine(.get(end));
		sign.setIndex(index);
		.add(sign);
	}
New to GrepCode? Check out our FAQ X