jdk.internal.org.objectweb.asm.commons.RemappingMethodAdapter Java Examples

The following examples show how to use jdk.internal.org.objectweb.asm.commons.RemappingMethodAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JIMethodMergeAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitEnd() {
    SimpleRemapper remapper = new SimpleRemapper(typeMap);
    for (MethodNode mn : cn.methods) {
        // Check if the method is in the list of methods to copy
        if (methodInFilter(mn.name, mn.desc)) {
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG, "Copying method: " + mn.name + mn.desc);
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG,  "   with mapper: " + typeMap);

            String[] exceptions = new String[mn.exceptions.size()];
            mn.exceptions.toArray(exceptions);
            MethodVisitor mv = cv.visitMethod(mn.access, mn.name, mn.desc, mn.signature, exceptions);
            mn.instructions.resetLabels();
            mn.accept(new RemappingMethodAdapter(mn.access, mn.desc, mv, remapper));
        }
    }
    super.visitEnd();
}
 
Example #2
Source File: JIMethodMergeAdapter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitEnd() {
    SimpleRemapper remapper = new SimpleRemapper(typeMap);
    for (MethodNode mn : cn.methods) {
        // Check if the method is in the list of methods to copy
        if (methodInFilter(mn.name, mn.desc)) {
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG, "Copying method: " + mn.name + mn.desc);
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG,  "   with mapper: " + typeMap);

            String[] exceptions = new String[mn.exceptions.size()];
            mn.exceptions.toArray(exceptions);
            MethodVisitor mv = cv.visitMethod(mn.access, mn.name, mn.desc, mn.signature, exceptions);
            mn.instructions.resetLabels();
            mn.accept(new RemappingMethodAdapter(mn.access, mn.desc, mv, remapper));
        }
    }
    super.visitEnd();
}
 
Example #3
Source File: JIMethodMergeAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitEnd() {
    SimpleRemapper remapper = new SimpleRemapper(typeMap);
    for (MethodNode mn : cn.methods) {
        // Check if the method is in the list of methods to copy
        if (methodInFilter(mn.name, mn.desc)) {
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG, "Copying method: " + mn.name + mn.desc);
            Logger.log(LogTag.JFR_SYSTEM_BYTECODE, LogLevel.DEBUG,  "   with mapper: " + typeMap);

            String[] exceptions = new String[mn.exceptions.size()];
            mn.exceptions.toArray(exceptions);
            MethodVisitor mv = cv.visitMethod(mn.access, mn.name, mn.desc, mn.signature, exceptions);
            mn.instructions.resetLabels();
            mn.accept(new RemappingMethodAdapter(mn.access, mn.desc, mv, remapper));
        }
    }
    super.visitEnd();
}