use of org.apache.bcel.generic.CodeExceptionGen in project jop by jop-devel.
the class MethodCode method getTargetingExceptionRanges.
public List<CodeExceptionGen> getTargetingExceptionRanges(InstructionHandle ih) {
List<CodeExceptionGen> list = new ArrayList<CodeExceptionGen>();
InstructionTargeter[] targeters = ih.getTargeters();
if (targeters == null)
return list;
for (InstructionTargeter t : targeters) {
if (t instanceof CodeExceptionGen) {
CodeExceptionGen ceg = (CodeExceptionGen) t;
if (ceg.getHandlerPC().equals(ih)) {
list.add(ceg);
}
}
}
return list;
}
use of org.apache.bcel.generic.CodeExceptionGen in project jop by jop-devel.
the class DescendingClassTraverser method visitMethodCode.
public void visitMethodCode(MethodInfo methodInfo) {
if (methodInfo.hasCode()) {
bcelVisitor.setCode(true);
MethodCode code = methodInfo.getCode();
visitor.visitMethodCode(code);
for (CodeExceptionGen ex : code.getExceptionHandlers()) {
visitor.visitCodeException(methodInfo, ex);
}
for (LineNumberGen lng : code.getLineNumbers()) {
visitor.visitLineNumber(methodInfo, lng);
}
for (LocalVariableGen lvg : code.getLocalVariables()) {
visitor.visitLocalVariable(methodInfo, lvg);
}
visitAttributes(code.getAttributes());
bcelVisitor.setCode(false);
}
}
Aggregations