Commit 1b0e9c507e920671053b9f0330d158912f736c9a
1 parent
f7711cd7
adding additional convenience constructors in BeforeFieldAccess
Showing
1 changed file
with
34 additions
and
11 deletions
java/common/com/mumfrey/liteloader/transformers/event/inject/BeforeFieldAccess.java
| ... | ... | @@ -3,6 +3,9 @@ package com.mumfrey.liteloader.transformers.event.inject; |
| 3 | 3 | import org.objectweb.asm.tree.AbstractInsnNode; |
| 4 | 4 | import org.objectweb.asm.tree.FieldInsnNode; |
| 5 | 5 | |
| 6 | +import com.mumfrey.liteloader.core.runtime.Obf; | |
| 7 | +import com.mumfrey.liteloader.transformers.event.MethodInfo; | |
| 8 | + | |
| 6 | 9 | /** |
| 7 | 10 | * An injection point which searches for GETFIELD and SETFIELD opcodes matching its arguments and returns a list of insns |
| 8 | 11 | * immediately prior to matching instructions. Only the field name is required, owners and signatures are optional and can |
| ... | ... | @@ -44,9 +47,9 @@ public class BeforeFieldAccess extends BeforeInvoke |
| 44 | 47 | this.opcode = opcode; |
| 45 | 48 | } |
| 46 | 49 | |
| 47 | - public BeforeFieldAccess(int opcode, String[] fieldNames, String[] fieldOwners, String[] methodSignatures) | |
| 50 | + public BeforeFieldAccess(int opcode, String[] fieldNames, String[] fieldOwners, String[] fieldSignatures) | |
| 48 | 51 | { |
| 49 | - super(fieldNames, fieldOwners, methodSignatures); | |
| 52 | + super(fieldNames, fieldOwners, fieldSignatures); | |
| 50 | 53 | this.opcode = opcode; |
| 51 | 54 | } |
| 52 | 55 | |
| ... | ... | @@ -56,15 +59,35 @@ public class BeforeFieldAccess extends BeforeInvoke |
| 56 | 59 | this.opcode = opcode; |
| 57 | 60 | } |
| 58 | 61 | |
| 59 | -// public BeforeFieldAccess(MethodInfo fieldInfo) | |
| 60 | -// { | |
| 61 | -// super(fieldInfo); | |
| 62 | -// } | |
| 63 | -// | |
| 64 | -// public BeforeFieldAccess(MethodInfo fieldInfo, int ordinal) | |
| 65 | -// { | |
| 66 | -// super(fieldInfo, ordinal); | |
| 67 | -// } | |
| 62 | + public BeforeFieldAccess(int opcode, Obf fieldNames, int ordinal) | |
| 63 | + { | |
| 64 | + super(fieldNames.names, ordinal); | |
| 65 | + this.opcode = opcode; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public BeforeFieldAccess(int opcode, Obf fieldNames, Obf fieldOwners) | |
| 69 | + { | |
| 70 | + super(fieldNames.names, fieldOwners.names); | |
| 71 | + this.opcode = opcode; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public BeforeFieldAccess(int opcode, Obf fieldNames, Obf fieldOwners, int ordinal) | |
| 75 | + { | |
| 76 | + super(fieldNames.names, fieldOwners.names, ordinal); | |
| 77 | + this.opcode = opcode; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public BeforeFieldAccess(int opcode, MethodInfo fieldInfo) | |
| 81 | + { | |
| 82 | + super(fieldInfo); | |
| 83 | + this.opcode = opcode; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public BeforeFieldAccess(int opcode, MethodInfo fieldInfo, int ordinal) | |
| 87 | + { | |
| 88 | + super(fieldInfo, ordinal); | |
| 89 | + this.opcode = opcode; | |
| 90 | + } | |
| 68 | 91 | |
| 69 | 92 | @Override |
| 70 | 93 | protected boolean matchesInsn(AbstractInsnNode insn) | ... | ... |