All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.unidbg.linux.android.dvm.jni.ProxyClassLoader Maven / Gradle / Ivy

There is a newer version: 0.9.8
Show newest version
package com.github.unidbg.linux.android.dvm.jni;

public class ProxyClassLoader {

    private final ClassLoader classLoader;

    ProxyClassLoader(ClassLoader classLoader) {
        this.classLoader = classLoader;
    }

    private ProxyClassMapper classNameMapper;

    final void setClassNameMapper(ProxyClassMapper classNameMapper) {
        this.classNameMapper = classNameMapper;
    }

    final Class loadClass(String name) throws ClassNotFoundException {
        Class newClass = classNameMapper == null ? null : classNameMapper.map(name);
        if (newClass != null) {
            return newClass;
        }
        return classLoader.loadClass(name);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy