boolean (HierarchicalMethodSignature signature, HierarchicalMethodSignature methodSignature) { //not generic if (methodSignature.getTypeParameters().length == 0) { return false; } //foreign class return signature.getMethod().getContainingClass() != methodSignature.getMethod().getContainingClass(); }