Returns the method in the given class's parent with the name and description. If it's not in the given class, further parents are checked. Returns null if nothing is found. @param owner @param name @param desc @return
(MappedClass owner, String name, String desc, boolean originalNames)
| 63 | * @return |
| 64 | */ |
| 65 | public static List<MappedMember> findMethodParent(MappedClass owner, String name, String desc, boolean originalNames) { |
| 66 | List<MappedMember> list = new ArrayList<MappedMember>(); |
| 67 | // Check for interfaces in the method's class. |
| 68 | for (MappedClass interfaceClass : owner.getInterfaces()) { |
| 69 | MappedMember mm = findMethodInParentInclusive(interfaceClass, name, desc,originalNames); |
| 70 | if (mm != null) { |
| 71 | list.add(mm); |
| 72 | } |
| 73 | } |
| 74 | // Check the parents |
| 75 | if (owner.getParent() != null) { |
| 76 | MappedMember mm = findMethodInParentInclusive(owner.getParent(), name, desc,originalNames); |
| 77 | if (mm != null) { |
| 78 | list.add(mm); |
| 79 | } |
| 80 | } |
| 81 | return list; |
| 82 | } |
| 83 | |
| 84 | public static MappedMember findMethodInParentInclusive(MappedClass owner, String name, String desc, boolean originalNames) { |
| 85 | for (MappedMember mm : owner.getMethods()) { |
nothing calls this directly
no test coverage detected