Shortcut method for returning a field
given an arrow type and name
with no sub fields
@param name the name of the field
@param arrowType the arrow type of the field
@return the resulting field
191501
public static Field field(String name,ArrowType arrowType) {
        return new Field(name,FieldType.nullable(arrowType), new ArrayList<Field>());
    }
383491
public MLArray getField(String name, int index)
    {
    	if (mlStructArray.isEmpty()) {
    		return null;
    	}
        return mlStructArray.get(index).get(name);
    }
737903
public static <T> Parser<T> tokenType(final Class<? extends T> type, final String name) {
    return token(new TokenMap<T>() {
      @Override public T map(Token token) {
        if (type.isInstance(token.value())) {
          return type.cast(token.value());
        }
        return null;
      }
      @Override public String toString() {
        return name;
      }
    });
  }
848123
public static Builder newBuilder(String name, LegacySQLTypeName type, Field... subFields) {
    return new Builder().setName(name).setType(type, subFields);
  }
894134
public static String getKey(String category, String name)
    {
        if(category != null && name != null)
            return category+":"+name;
        return null;
    }
709734
public static Field findField(Class<?> type, String name) {
        if (type == null) {
            throw new IllegalArgumentException("Method argument type must not be null");
        }
        if (name == null) {
            throw new IllegalArgumentException("Method argument name must not be null");
        }

        Class<?> c = type;

        do {
            for (Field f : c.getDeclaredFields()) {
                if (name.equals(f.getName())) {
                    return f;
                }
            }
            c = c.getSuperclass();
        } while (c != null);

        return 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;
  }
290858
public FieldDeclaration getFieldNode(String name, String signature) {
    for (EntityDeclaration node : type.getMembers()) {
      if (node.getEntityType() == EntityType.FIELD) {
        FieldDeclaration field = (FieldDeclaration) node;
        if (field.getName().equals(name)
            && signature(field.getReturnType()).equals(signature)) {
          return field;
        }
      }
    }
    return null;
  }
1059814
public ParsedField getParsableField(final String type, final String name) {
        return cache.get(ParsedField.makeId(type, name));
    }
664067
public static Field getRequiredField(Class type, String name) {
        try {
            return type.getDeclaredField(name);
        } catch (NoSuchFieldException e) {
            Optional<Field> field = findField(type, name);
            return field.orElseThrow(() -> new NoSuchFieldError("No field '" + name + "' found for type: " + type.getName()));
        }
    }
808051
public String getTranslatedFieldName(String name) {
        if (xfa.isXfaPresent()) {
            String namex = xfa.findFieldName(name, this);
            if (namex != null)
                name = namex;
        }
        return name;
    }
1061665
private static MessageElement getMapKVMessageElements(String name, MapType mapType) {
        MessageElement.Builder ret = MessageElement.builder();
        ret.name(name);

        DataType keyType = mapType.keyType();
        Builder fieldBuilder = FieldElement.builder().name("key").tag(1);
        fieldBuilder.type(keyType).label(FieldElement.Label.OPTIONAL);
        ret.addField(fieldBuilder.build());

        DataType valueType = mapType.valueType();
        fieldBuilder = FieldElement.builder().name("value").tag(2);
        fieldBuilder.type(valueType).label(FieldElement.Label.OPTIONAL);
        ret.addField(fieldBuilder.build());

        return ret.build();
    }
1176755
public UserDefinedTypeBuilder withField(CqlIdentifier name, DataType type) {
    fieldNames.add(name);
    fieldTypes.add(type);
    return this;
  }
1208058
public FieldInfo getFieldInfo(String name) {
    if (name != null) {
      if (ignoreCase) {
        name = name.toLowerCase(Locale.US);
      }
      name = name.intern();
    }
    return nameToFieldInfoMap.get(name);
  }
961347
public TypeName findParameterTypeByAliasOrName(String name) {
		if (parameterAlias2NameField.containsKey(name)) {
			return findParameterType(parameterAlias2NameField.get(name));
		}

		return findParameterType(name);
	}
217171
public static Field getFieldIgnoreCase(Class c, String name) throws NoSuchFieldException {
	Field[] fields = c.getFields();
	for (int i = 0; i < fields.length; i++) {
	    Field f = fields[i];
	    // Same Name
	    if (f.getName().equalsIgnoreCase(name)) {
		return f;
	    }
	}
	throw new NoSuchFieldException("Field doesn't exist");
    }
530334
public TypeName findParameterType(String name) {
		for (Pair<String, TypeName> item : parameters) {
			if (item.value0.equals(name)) {
				return item.value1;
			}
		}
		return null;
	}