public class ClassIO
extends java.lang.Object
| Constructor and Description |
|---|
ClassIO() |
| Modifier and Type | Method and Description |
|---|---|
static org.objectweb.asm.tree.ClassNode |
fromBytes(byte[] bytes)
Read a class from a byte array.
|
static org.objectweb.asm.tree.ClassNode |
fromBytes(byte[] bytes,
int flags)
Read a class from a byte array.
|
static byte[] |
toBytes(org.objectweb.asm.tree.ClassNode node,
ClassInfoProvider classInfoProvider)
Write a class to a byte array.
|
static byte[] |
toBytes(org.objectweb.asm.tree.ClassNode node,
int flags,
ClassInfoProvider classInfoProvider)
Write a class to a byte array.
|
static byte[] |
toStacklessBytes(org.objectweb.asm.tree.ClassNode node)
Write a class to a byte array without computing the stack map frames.
|
static byte[] |
toStacklessBytes(org.objectweb.asm.tree.ClassNode node,
int flags)
Write a class to a byte array without computing the stack map frames.
|
public static org.objectweb.asm.tree.ClassNode fromBytes(byte[] bytes)
ClassReader.EXPAND_FRAMES flag.bytes - The bytecode of the classpublic static org.objectweb.asm.tree.ClassNode fromBytes(byte[] bytes,
int flags)
bytes - The bytecode of the classflags - The flags to use for reading the classpublic static byte[] toBytes(org.objectweb.asm.tree.ClassNode node,
ClassInfoProvider classInfoProvider)
classInfoProvider is used for stack map frame calculation.node - The class nodeclassInfoProvider - The class info providerpublic static byte[] toBytes(org.objectweb.asm.tree.ClassNode node,
int flags,
ClassInfoProvider classInfoProvider)
classInfoProvider is used for stack map frame calculation, if enabled.node - The class nodeflags - The flags to use for writing the classclassInfoProvider - The class info providerpublic static byte[] toStacklessBytes(org.objectweb.asm.tree.ClassNode node)
ClassWriter.COMPUTE_MAXS flag.node - The class nodepublic static byte[] toStacklessBytes(org.objectweb.asm.tree.ClassNode node,
int flags)
node - The class nodeflags - The flags to use for writing the class