| Package | Description |
|---|---|
| jasm.attributes |
Provides classes for representing class file attributes, including code necessary for encoding and decoding them.
|
| jasm.io |
Provides classes for reading/writing class files and Jasm files.
|
| jasm.lang |
Provides core class for representing JVM class files, bytecodes, types and constants.
|
| Modifier and Type | Method and Description |
|---|---|
void |
StackMapTable.addPoolItems(Set<Constant.Info> constantPool) |
void |
SourceFile.addPoolItems(Set<Constant.Info> constantPool) |
void |
LineNumberTable.addPoolItems(Set<Constant.Info> constantPool) |
void |
InnerClasses.addPoolItems(Set<Constant.Info> constantPool) |
void |
Exceptions.addPoolItems(Set<Constant.Info> constantPool) |
void |
ConstantValue.addPoolItems(Set<Constant.Info> constantPool) |
void |
Code.addPoolItems(Set<Constant.Info> constantPool) |
void |
StackMapTable.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
SourceFile.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
LineNumberTable.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
InnerClasses.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
Exceptions.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
ConstantValue.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
Code.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
void |
StackMapTable.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
SourceFile.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
LineNumberTable.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
InnerClasses.write(BinaryOutputStream output,
Map<Constant.Info,Integer> constantPool) |
void |
Exceptions.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
ConstantValue.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
Code.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
LineNumberTable.write(int[] bytecodeOffsets,
BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
void |
Code.BytecodeMapAttribute.write(int[] bytecodeOffsets,
BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool)
This method requires the attribute to write itself to the binary
stream.
|
| Modifier and Type | Method and Description |
|---|---|
Constant.Info |
ClassFileReader.getConstant(int index)
Read constant value from this classfile's constant pool.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
ClassFileReader.convert(Constant.Info constant)
Convert a constant pool item into a Java constant object (e.g.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
JasmFileWriter.writeField(ClassFile.Field f,
HashMap<Constant.Info,Integer> poolMap) |
protected void |
ClassFileWriter.writeField(ClassFile.Field f,
HashMap<Constant.Info,Integer> constantPool) |
protected void |
ClassFileWriter.writeMethod(ClassFile.Method m,
HashMap<Constant.Info,Integer> constantPool) |
protected void |
JasmFileWriter.writeMethod(ClassFile clazz,
ClassFile.Method method,
HashMap<Constant.Info,Integer> poolMap) |
| Modifier and Type | Class and Description |
|---|---|
static class |
Constant.Class |
static class |
Constant.Double |
static class |
Constant.Dummy |
static class |
Constant.FieldRef |
static class |
Constant.Float |
static class |
Constant.Integer |
static class |
Constant.InterfaceMethodRef |
static class |
Constant.Long |
static class |
Constant.MethodRef |
static class |
Constant.NameType |
static class |
Constant.String |
static class |
Constant.Utf8 |
| Modifier and Type | Method and Description |
|---|---|
static Constant.Info |
Constant.fromNumber(Number c)
This method creates a CONSTANT_info object from a Number object.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<Constant.Info> |
ClassFile.constantPool()
This method builds a constant pool for this class file.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
Constant.addPoolItem(Constant.Info item,
Set<Constant.Info> constantPool)
Recursively add a CONSTANT_Info object to a constant pool.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
Constant.addPoolItem(Constant.Info item,
Set<Constant.Info> constantPool)
Recursively add a CONSTANT_Info object to a constant pool.
|
void |
BytecodeAttribute.addPoolItems(Set<Constant.Info> constantPool)
When this method is called, the attribute must add all items that it
needs to the constant pool.
|
void |
BytecodeAttribute.Unknown.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.addPoolItems(Set<Constant.Info> constantPool)
This method adds any constant pool items required by the bytecode to the
constantPool.
|
void |
Bytecode.LoadConst.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.PutField.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.GetField.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.Invoke.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.New.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.CheckCast.addPoolItems(Set<Constant.Info> constantPool) |
void |
Bytecode.InstanceOf.addPoolItems(Set<Constant.Info> constantPool) |
void |
BytecodeAttribute.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool)
This method is used to print the contents of the attribute in
human-readable form, similar to that produced by "javap".
|
void |
BytecodeAttribute.Unknown.print(PrintWriter output,
Map<Constant.Info,Integer> constantPool) |
BytecodeAttribute |
BytecodeAttribute.Reader.read(BinaryInputStream input,
Map<Integer,Constant.Info> constantPool) |
static BytecodeAttribute |
BytecodeAttribute.Fn.read(BinaryInputStream input,
Map<Integer,Constant.Info> constantPool,
Map<String,BytecodeAttribute.Reader> readers)
Read a BytecodeAttribute from an input stream, using the given
constant pool and readers map to decode them.
|
static List<BytecodeAttribute> |
BytecodeAttribute.Fn.read(int count,
BinaryInputStream input,
Map<Integer,Constant.Info> constantPool,
Map<String,BytecodeAttribute.Reader> readers)
Read a list of BytecodeAttributes from an input stream, using the
given constant pool and readers map to decode them.
|
abstract byte[] |
Bytecode.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool)
Translate this Java bytecode into bytes.
|
byte[] |
Bytecode.Store.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Load.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Iinc.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.ArrayLoad.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.ArrayStore.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.LoadConst.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Return.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Label.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Neg.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.BinOp.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.PutField.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.GetField.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Invoke.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Conversion.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Goto.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.If.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Cmp.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.IfCmp.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Switch.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Pop.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Dup.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.DupX1.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.DupX2.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Swap.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.New.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.ArrayLength.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.CheckCast.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.InstanceOf.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Nop.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.Throw.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.MonitorEnter.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
byte[] |
Bytecode.MonitorExit.toBytes(int offset,
Map<String,Integer> labelOffsets,
Map<Constant.Info,Integer> constantPool) |
abstract byte[] |
Constant.Info.toBytes(Map<Constant.Info,Integer> constantPool)
Convert this pool item into bytes.
|
byte[] |
Constant.Utf8.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.String.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Integer.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Long.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Float.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Double.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Class.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.FieldRef.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.MethodRef.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.InterfaceMethodRef.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.NameType.toBytes(Map<Constant.Info,Integer> constantPool) |
byte[] |
Constant.Dummy.toBytes(Map<Constant.Info,Integer> constantPool) |
void |
BytecodeAttribute.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool)
This method requires the attribute to write itself to the binary stream.
|
void |
BytecodeAttribute.Unknown.write(BinaryOutputStream writer,
Map<Constant.Info,Integer> constantPool) |
Copyright © 2016. All rights reserved.