|
|
@ -2,9 +2,34 @@ package dev.openrs2.asm; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.objectweb.asm.tree.FieldInsnNode; |
|
|
|
|
|
|
|
import org.objectweb.asm.tree.FieldNode; |
|
|
|
|
|
|
|
import org.objectweb.asm.tree.MethodInsnNode; |
|
|
|
|
|
|
|
import org.objectweb.asm.tree.MethodNode; |
|
|
|
|
|
|
|
|
|
|
|
public final class MemberDesc { |
|
|
|
public final class MemberDesc { |
|
|
|
private final String name, desc; |
|
|
|
private final String name, desc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(FieldNode field) { |
|
|
|
|
|
|
|
this(field.name, field.desc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(MethodNode method) { |
|
|
|
|
|
|
|
this(method.name, method.desc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(FieldInsnNode fieldInsn) { |
|
|
|
|
|
|
|
this(fieldInsn.name, fieldInsn.desc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(MethodInsnNode methodInsn) { |
|
|
|
|
|
|
|
this(methodInsn.name, methodInsn.desc); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(MemberRef memberRef) { |
|
|
|
|
|
|
|
this(memberRef.getName(), memberRef.getDesc()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public MemberDesc(String name, String desc) { |
|
|
|
public MemberDesc(String name, String desc) { |
|
|
|
this.name = name; |
|
|
|
this.name = name; |
|
|
|
this.desc = desc; |
|
|
|
this.desc = desc; |
|
|
|