Finds a field matching the given name in this class or a parent class.

@param name the name of the field of interest
@return the method matching the given name and parameters or null
554811
public FieldNode getField(String name) {
        ClassNode node = this;
        while (node != null) {
            FieldNode fn = node.getDeclaredField(name);
            if (fn != null) return fn;
            node = node.getSuperClass();
        }
        return null;
    }
1218990
public JavaMethod getMethod(String name)
  {
    ArrayList<JavaMethod> methodList = getMethodList();
    
    for (int i = 0; i < methodList.size(); i++) {
      JavaMethod method = methodList.get(i);

      if (method.getName().equals(name))
        return method;
    }

    return null;
  }
723920
@Nullable
  public static Method getMethodByName(Class<?> clazz, String name) {
    for (Method method : clazz.getMethods())
      if (method.getName().equals(name))
        return method;

    return null;
  }
692333
public Field getField(String fieldName) {
		final PropDesc desc = this.propMap.get(fieldName);
		return null == desc ? null : desc.getField();
	}
591283
public Method getMethod(final String name) {
      if (StringUtils.isNullOrBlank(name)) {
         return null;
      }
      return getMethods().stream().filter(method -> method.getName().equals(name)).findFirst().orElse(null);
   }
1150904
public Field field(String name) {
    for (Field field : declaredFields) {
      if (field.name().equals(name)) {
        return field;
      }
    }
    for (OneOf oneOf : oneOfs) {
      for (Field field : oneOf.fields()) {
        if (field.name().equals(name)) {
          return field;
        }
      }
    }
    return null;
  }
679418
public static Method getMethod(Class<?> clazz, String name, boolean withParameters) {
        if (clazz == Object.class || clazz == null) {
            return null;
        }

        try {
            // first try without parameters
            Method method = clazz.getDeclaredMethod(name);
            return method;
        } catch (SecurityException e) {
            throw new IllegalStateException(e);
        } catch (NoSuchMethodException e) {
            if (withParameters) {
                Method[] methods = getMethods(clazz);
                for (Method method : methods) {
                    if (name.equals(method.getName())) {
                        return method;
                    }
                }
                return null;
            }
            return getMethod(clazz.getSuperclass(), name, withParameters);
        }
    }
1236375
private static FieldInfo getFieldInfo(String name)
    {
        FieldInfo info = (FieldInfo)__info.get(name);
        if (info==null)
            info = new FieldInfo(name,false);
        return info;
    }
358576
public DefBase getFeature(String name)
    {
        DefBase result = getField(name);

        if (result == null)
        {
            result = getReference(name);
        }
        if (result == null)
        {
            result = getCollection(name);
        }
        return result;
    }
815981
public List<Method> getMethods( String name )
    {
        List<Method> methods = new ArrayList<Method>();
        
        for (Method method : target.getMethods())
        {
            if (compare( method.getName(), name )) methods.add(method);
        }
        return methods;
    }
755507
public Field getField(String name) {
    if (fieldMap == null) {
      return null;
    }
    return fieldMap.get(name);
  }
573002
public Variable find(String name) {
        if (context.containsKey(name)) {
            return context.get(name);
        }
        if (parent != null) {
            return parent.find(name);
        }
        return null;
    }
501155
public T lookup(String name) throws NamingException {
        T binding = super.get(name);
        if (binding != null) {
            return binding;
        }

        // Binding does not exist.  Check if any the contexts are bindings.
        String contextName = name;
        while (!(contextName = getContextName(contextName)).isEmpty()) {
            if (containsKey(contextName)) {
                throw new NotContextException(namespace + "/" + contextName);
            }
        }

        return null;
    }
1336617
private Field getFieldRecursive(Class c, String name) throws NoSuchFieldException
    {
        try
        {
            return c.getDeclaredField(name);
        }
        catch (NoSuchFieldException e)
        {
            // if field  could not be found in the inheritance hierarchy, signal error
            if ((c == Object.class) || (c.getSuperclass() == null) || c.isInterface())
            {
                throw e;
            }
            // if field could not be found in class c try in superclass
            else
            {
                return getFieldRecursive(c.getSuperclass(), name);
            }
        }
    }
234168
protected Field findField() throws FinderFieldNotFoundException {

    try {
      if (fieldName != null) {
        return beanType.getField(fieldName);
      }

      try {
        return beanType.getField("find");

      } catch (NoSuchFieldException e) {
        return beanType.getField("FIND");
      }
    } catch (NoSuchFieldException e) {
      throw new FinderFieldNotFoundException(e);
    }
  }
1302792
public MethodNode getMethod(String name, Parameter[] parameters) {
        for (MethodNode method : getMethods(name)) {
            if (parametersEqual(method.getParameters(), parameters)) {
                return method;
            }
        }
        return null;
    }
961347
public TypeName findParameterTypeByAliasOrName(String name) {
		if (parameterAlias2NameField.containsKey(name)) {
			return findParameterType(parameterAlias2NameField.get(name));
		}

		return findParameterType(name);
	}