Finds a FieldNode matching the given name in this class or any of its superclasses. This method searches the inheritance hierarchy starting from this ClassNode and moving up through superclasses until a field with the matching name is found. @param name the name of the field to find @return
(String name)
| 1209 | * @see #getFields() |
| 1210 | */ |
| 1211 | public FieldNode getField(String name) { |
| 1212 | ClassNode node = this; |
| 1213 | while (node != null) { |
| 1214 | FieldNode fn = node.getDeclaredField(name); |
| 1215 | if (fn != null) return fn; |
| 1216 | node = node.getSuperClass(); |
| 1217 | } |
| 1218 | return null; |
| 1219 | } |
| 1220 | |
| 1221 | public List<Statement> getObjectInitializerStatements() { |
| 1222 | if (objectInitializers == null) |