private static boolean isDeclaredMoreThanOnce(AsmClass thrownClass, List<AsmClass> thrownClassCandidates) { int matches = 0; for (AsmClass thrownClassCandidate : thrownClassCandidates) { if (thrownClass.equals(thrownClassCandidate)) { matches++; } } return matches > 1; }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AsmMethod) { AsmMethod otherMethod = (AsmMethod) object; return parent.equals(otherMethod.parent) && key.equals(otherMethod.key); } return false; }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AsmField) { AsmField otherField = (AsmField) object; return parent.equals(otherField.parent) && name.equals(otherField.name); } return false; }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AsmMethod) { AsmMethod otherMethod = (AsmMethod) object; return parent.equals(otherMethod.parent) && key.equals(otherMethod.key); } return false; }
@Override public boolean equals(Object object) { if (this == object) { return true; } if (object instanceof AsmField) { AsmField otherField = (AsmField) object; return parent.equals(otherField.parent) && name.equals(otherField.name); } return false; }
private static boolean isSubClassOfAny(AsmClass thrownClass, List<AsmClass> thrownClassCandidates) { for (AsmClass current = thrownClass.getSuperClass(); current != null; current = current.getSuperClass()) { for (AsmClass thrownClassCandidate : thrownClassCandidates) { if (current.equals(thrownClassCandidate)) { return true; } } } return false; }