public int compare(final Object o1, final Object o2) { Assert.isTrue(o1 instanceof MemberRef, o1 + " is not a MemberRef!"); Assert.isTrue(o2 instanceof MemberRef, o2 + " is not a MemberRef!"); final MemberRef me1 = (MemberRef) o1; final MemberRef me2 = (MemberRef) o2; final String s1 = me1.declaringClass() + "." + me1.name() + me1.type(); final String s2 = me2.declaringClass() + "." + me2.name() + me2.type(); return (s1.compareTo(s2)); }
public FieldNode field(MemberRef ref) { for (ClassNode c : classes()) { if (ref.declaringClass().equals(Type.getType("L" + c.name() + ";"))) { for (FieldNode f : c.fields()) { if (ref.nameAndType().equals(f.editor.nameAndType())) { return f; } } } } return null; }