Java tutorial
/** License information: * Component: javaslicer-tracer * Package: de.unisb.cs.st.javaslicer.tracer.instrumentation * Class: JSRInliner * Filename: javaslicer-tracer/src/main/java/de/unisb/cs/st/javaslicer/tracer/instrumentation/JSRInliner.java * * This file is part of the JavaSlicer tool, developed by Clemens Hammacher at Saarland University. * See http://www.st.cs.uni-saarland.de/javaslicer/ for more information. * * JavaSlicer is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * JavaSlicer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with JavaSlicer. If not, see <http://www.gnu.org/licenses/>. */ package de.unisb.cs.st.javaslicer.tracer.instrumentation; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import org.objectweb.asm.commons.JSRInlinerAdapter; public class JSRInliner extends ClassVisitor { public JSRInliner(final ClassVisitor cv) { super(Opcodes.ASM5, cv); } @Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { final MethodVisitor visitor = super.visitMethod(access, name, desc, signature, exceptions); return visitor == null ? null : new JSRInlinerAdapter(visitor, access, name, desc, signature, exceptions); } }