public class BytecodeLoader
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BytecodeLoader.Loader |
Constructor and Description |
---|
BytecodeLoader() |
Modifier and Type | Method and Description |
---|---|
static void |
fixPyBytecode(java.lang.Class<? extends ContainsPyBytecode> c)
This method looks for Python-Bytecode stored in String literals.
|
static java.lang.Class<?> |
makeClass(java.lang.String name,
byte[] data,
java.lang.Class<?>... referents)
Turn the Java class file data into a Java class.
|
static java.lang.Class<?> |
makeClass(java.lang.String name,
java.util.List<java.lang.Class<?>> referents,
byte[] data)
Turn the Java class file data into a Java class.
|
static PyCode |
makeCode(java.lang.String name,
byte[] data,
java.lang.String filename)
Turn the Java class file data for a compiled Python module into a
PyCode object, by
constructing an instance of the named class and calling the instance's
PyRunnable.getMain() . |
public static java.lang.Class<?> makeClass(java.lang.String name, byte[] data, java.lang.Class<?>... referents)
name
- fully-qualified binary name of the classdata
- a class file as a byte arrayreferents
- super-classes and interfaces that the new class will reference.public static java.lang.Class<?> makeClass(java.lang.String name, java.util.List<java.lang.Class<?>> referents, byte[] data)
name
- the name of the classreferents
- super-classes and interfaces that the new class will reference.data
- a class file as a byte arraypublic static void fixPyBytecode(java.lang.Class<? extends ContainsPyBytecode> c) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException, java.io.IOException, java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
java.io.IOException
java.lang.ClassNotFoundException
public static PyCode makeCode(java.lang.String name, byte[] data, java.lang.String filename)
PyCode
object, by
constructing an instance of the named class and calling the instance's
PyRunnable.getMain()
.name
- fully-qualified binary name of the classdata
- a class file as a byte arrayfilename
- to provide to the constructor of the named classPyCode
object produced by the named class' getMain