diff options
Diffstat (limited to 'src/main/java/ftbsc/lll/utils/nodes/FieldProxyInsnNode.java')
-rw-r--r-- | src/main/java/ftbsc/lll/utils/nodes/FieldProxyInsnNode.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/lll/utils/nodes/FieldProxyInsnNode.java b/src/main/java/ftbsc/lll/utils/nodes/FieldProxyInsnNode.java new file mode 100644 index 0000000..e809ccd --- /dev/null +++ b/src/main/java/ftbsc/lll/utils/nodes/FieldProxyInsnNode.java @@ -0,0 +1,22 @@ +package ftbsc.lll.utils.nodes; + +import ftbsc.lll.proxies.impl.FieldProxy; +import org.objectweb.asm.tree.FieldInsnNode; + +/** + * Overrides the {@link FieldInsnNode} to add a constructor + * taking in a {@link FieldProxy}. + * @since 0.3.0 + */ +public class FieldProxyInsnNode extends FieldInsnNode { + /** + * Constructs a new {@link FieldInsnNode} starting + * from a {@link FieldProxy}. + * @param opcode the opcode, must be one of GETSTATIC, PUTSTATIC, + * GETFIELD or PUTFIELD + * @param f a {@link FieldProxy} representing the field to call + */ + public FieldProxyInsnNode(int opcode, FieldProxy f) { + super(opcode, f.parent.internalName, f.name, f.descriptor); + } +} |