org.zeroturnaround.javarebel.integration.util.ClassUtil Maven / Gradle / Ivy
The newest version!
package org.zeroturnaround.javarebel.integration.util;
import java.io.IOException;
import java.io.InputStream;
/**
* Helper methods for classes.
*
* @author Rein Raudjärv
*/
public class ClassUtil {
public static byte[] getBytecode(ClassLoader cl, String className) throws IOException {
InputStream in = cl.getResourceAsStream(getResourecName(className));
return IoUtil.getBytesAndClose(in);
}
public static String getResourecName(String className) {
return className.replace('.', '/') + ".class";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy