Search in sources :

Example 6 with LineNumberGen

use of org.apache.bcel.generic.LineNumberGen 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);
    }
}
Also used : LineNumberGen(org.apache.bcel.generic.LineNumberGen) LocalVariableGen(org.apache.bcel.generic.LocalVariableGen) MethodCode(com.jopdesign.common.MethodCode) CodeExceptionGen(org.apache.bcel.generic.CodeExceptionGen)

Aggregations

LineNumberGen (org.apache.bcel.generic.LineNumberGen)6 CallString (com.jopdesign.common.code.CallString)2 HashedString (com.jopdesign.common.misc.HashedString)2 InstructionHandle (org.apache.bcel.generic.InstructionHandle)2 MethodCode (com.jopdesign.common.MethodCode)1 AppInfoError (com.jopdesign.common.misc.AppInfoError)1 CodeExceptionGen (org.apache.bcel.generic.CodeExceptionGen)1 LocalVariableGen (org.apache.bcel.generic.LocalVariableGen)1