project: Mixing stuff and what not

This commit is contained in:
Owain van Brakel
2021-10-27 02:23:44 +02:00
parent c7ae30f788
commit 24d7c9c351
23 changed files with 545 additions and 181 deletions

View File

@@ -56,6 +56,13 @@ public class GetField extends Instruction implements GetFieldInstruction
this.field = field;
}
public GetField(Instructions instructions, net.runelite.asm.Field field)
{
super(instructions, InstructionType.GETFIELD);
this.field = field.getPoolField();
this.myField = field;
}
@Override
public String toString()
{

View File

@@ -56,6 +56,13 @@ public class GetStatic extends Instruction implements GetFieldInstruction
this.field = field;
}
public GetStatic(Instructions instructions, net.runelite.asm.Field field)
{
super(instructions, InstructionType.GETSTATIC);
this.field = field.getPoolField();
this.myField = field;
}
@Override
public String toString()
{

View File

@@ -64,6 +64,13 @@ public class InvokeSpecial extends Instruction implements InvokeInstruction
this.method = method;
}
public InvokeSpecial(Instructions instructions, net.runelite.asm.Method method)
{
super(instructions, InstructionType.INVOKESPECIAL);
this.method = method.getPoolMethod();
this.myMethod = method;
}
@Override
public void accept(MethodVisitor visitor)
{

View File

@@ -64,6 +64,13 @@ public class InvokeStatic extends Instruction implements InvokeInstruction
this.method = method;
}
public InvokeStatic(Instructions instructions, net.runelite.asm.Method method)
{
super(instructions, InstructionType.INVOKESTATIC);
this.method = method.getPoolMethod();
this.myMethod = method;
}
@Override
public void accept(MethodVisitor visitor)
{

View File

@@ -66,6 +66,13 @@ public class InvokeVirtual extends Instruction implements InvokeInstruction
this.method = method;
}
public InvokeVirtual(Instructions instructions, net.runelite.asm.Method method)
{
super(instructions, InstructionType.INVOKEVIRTUAL);
this.method = method.getPoolMethod();
this.myMethod = method;
}
@Override
public void accept(MethodVisitor visitor)
{

View File

@@ -56,6 +56,13 @@ public class New extends Instruction implements TypeInstruction
this.clazz = clazz;
}
public New(Instructions instructions, net.runelite.asm.ClassFile classFile)
{
super(instructions, InstructionType.NEW);
this.clazz = classFile.getPoolClass();
this.myClass = classFile;
}
@Override
public void accept(MethodVisitor visitor)
{

View File

@@ -53,6 +53,12 @@ public class PutField extends Instruction implements SetFieldInstruction
super(instructions, type);
}
public PutField(Instructions instructions, Field field)
{
super(instructions, InstructionType.PUTFIELD);
this.field = field;
}
public PutField(Instructions instructions, net.runelite.asm.Field field)
{
super(instructions, InstructionType.PUTFIELD);

View File

@@ -52,6 +52,12 @@ public class PutStatic extends Instruction implements SetFieldInstruction
super(instructions, type);
}
public PutStatic(Instructions instructions, Field field)
{
super(instructions, InstructionType.PUTSTATIC);
this.field = field;
}
public PutStatic(Instructions instructions, net.runelite.asm.Field field)
{
super(instructions, InstructionType.PUTSTATIC);

View File

@@ -32,7 +32,7 @@ public class Field
{
private final Class clazz;
private final String name;
private final Type type;
private Type type;
public Field(Class clazz, String name, Type type)
{
@@ -102,4 +102,9 @@ public class Field
{
return type;
}
public void setType(Type type)
{
this.type = type;
}
}

View File

@@ -31,7 +31,7 @@ public class Method
{
private final Class clazz;
private final String name;
private final Signature type;
private Signature type;
public Method(Class clazz, String name, Signature type)
{
@@ -101,4 +101,9 @@ public class Method
{
return type;
}
public void setType(Signature type)
{
this.type = type;
}
}