Returns the field 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)
| 131 | * @return |
| 132 | */ |
| 133 | public static MappedMember findFieldInParent(MappedClass owner, String name, String desc, boolean originalNames) { |
| 134 | |
| 135 | // Check for interfaces in the field's class. |
| 136 | for (MappedClass interfaceClass : owner.getInterfaces()) { |
| 137 | MappedMember mm = findFieldInParentInclusive(interfaceClass, name, desc, originalNames); |
| 138 | if (mm != null) { |
| 139 | return mm; |
| 140 | } |
| 141 | } |
| 142 | // Check the parents |
| 143 | if (owner.getParent() != null) { |
| 144 | MappedMember mm = findFieldInParentInclusive(owner.getParent(), name, desc, originalNames); |
| 145 | if (mm != null) { |
| 146 | return mm; |
| 147 | } |
| 148 | } |
| 149 | return null; |
| 150 | } |
| 151 | |
| 152 | public static MappedMember findFieldInParentInclusive(MappedClass owner, String name, String desc, boolean originalNames) { |
| 153 | // Check the class itself |
nothing calls this directly
no test coverage detected