<p>
Looks up a field value by name.
If the field value has not been declared, then makes full effort to resolve and declare it.
</p>
771932
public FieldValue evaluate(FieldName name){
		Map<FieldName, FieldValue> values = getValues();

		FieldValue value = values.getOrDefault(name, EvaluationContext.UNDECLARED_VALUE);
		if(value != EvaluationContext.UNDECLARED_VALUE){
			return value;
		}

		return resolve(name);
	}
220555
public FieldValue get(String name) {
    if (schema == null) {
      throw new UnsupportedOperationException(
          "Retrieving field value by name is not supported when there is no fields schema provided");
    }
    return get(schema.getIndex(name));
  }
1110208
private void checkForNull(String name, Object value) {
        if(name == null) {
            throw new NullPointerException("name must not be null");
        }
        if(value == null) {
            throw new NullPointerException("value must not be null");
        }
    }
143999
public boolean hasValue(String fieldName) {
		return resultMap.containsKey(fieldName) && resultMap.get(fieldName) != null;
	}
157638
protected void checkFieldNotNull( Object fieldValue,
                                      String fieldName ) throws RepositoryException {
        if (fieldValue == null) {
            throw new RepositoryException(JcrI18n.requiredFieldNotSetInConnector.text(getSourceName(), getClass(), fieldName));
        }
    }
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;
    }
755507
public Field getField(String name) {
    if (fieldMap == null) {
      return null;
    }
    return fieldMap.get(name);
  }
652590
@Internal
    @UsedByGeneratedCode
    protected final boolean containsValueForField(BeanResolutionContext resolutionContext, BeanContext context, int fieldIndex) {
        if (context instanceof ApplicationContext) {
            FieldInjectionPoint injectionPoint = fieldInjectionPoints.get(fieldIndex);
            final AnnotationMetadata annotationMetadata = injectionPoint.getAnnotationMetadata();
            String valueAnnVal = annotationMetadata.getValue(Value.class, String.class).orElse(null);
            String valString = resolvePropertyValueName(resolutionContext, injectionPoint, valueAnnVal, annotationMetadata);
            ApplicationContext applicationContext = (ApplicationContext) context;
            Class fieldType = injectionPoint.getType();
            boolean isConfigProps = fieldType.isAnnotationPresent(ConfigurationProperties.class);
            boolean result = isConfigProps || Map.class.isAssignableFrom(fieldType) ? applicationContext.containsProperties(valString) : applicationContext.containsProperty(valString);
            if (!result && isConfigurationProperties()) {
                String cliOption = resolveCliOption(injectionPoint.getName());
                if (cliOption != null) {
                    return applicationContext.containsProperty(cliOption);
                }
            }
            return result;
        }
        return false;
    }
466514
public boolean containsField(String name) {
      if (StringUtils.isNullOrBlank(name)) {
         return false;
      }
      return ClassDescriptorCache.getInstance()
                                 .getClassDescriptor(clazz)
                                 .getFields(accessAll)
                                 .stream()
                                 .anyMatch(f -> f.getName().equals(name));
   }
464407
public void setHeaderValue(String name,String value)
    {
        _fields.put(name,Collections.singletonList(value));
    }
658794
public void setFieldName(final String name)
    {
        if (!isInStruct())
        {
            throw new IllegalStateException("IonWriter.setFieldName() must be called before writing a value into a struct.");
        }
        if (name == null)
        {
            throw new NullPointerException("Null field name is not allowed.");
        }
        final SymbolToken token = intern(name);
        user.setFieldNameSymbol(token);
    }
1342007
public JavaField getField(String name)
  {
    ArrayList<JavaField> fieldList = getFieldList();
    
    for (int i = 0; i < fieldList.size(); i++) {
      JavaField field = fieldList.get(i);

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

    return null;
  }
555378
private int findIndexForName(String[] fieldNames, String searchName)
    {
        for(int i = 0; i < fieldNames.length; i++)
        {
            if(searchName.equals(fieldNames[i]))
            {
                return i;
            }
        }
        throw new PersistenceBrokerException("Can't find field name '" + searchName +
                "' in given array of field names");
    }
368758
private Function findField(String name) {
        Selection slkt;
        Function f;

        if (name.indexOf('.') == -1) {
            name = type.getName() + "." + name;
        }
        slkt = Method.forName(name);
        if (slkt.size() == 0) {
            f = Field.forName(name);
            if (f != null) {
                slkt = slkt.add(new Selection(f));
            }
        }
        slkt = slkt.restrictArgumentCount(1);
        slkt = slkt.restrictArgumentType(0, type);
        switch (slkt.size()) {
        case 0:
            throw new RuntimeException("no such field: " + name);
        case 1:
            return slkt.getFunction();
        default:
            throw new RuntimeException("ambiguous field: " + name);
        }
    }
344578
public static Optional<Field> resolveField(Class<?> someClass, String fieldName) {
        return fieldCache.get(new FieldReference(someClass, fieldName));
    }
585644
protected static IJavaClassField findField( IJavaClassInfo cls, String name ) {
    IJavaClassField[] allFields = cls.getFields();

    for (IJavaClassField f : allFields) {
      if (f.getName().equals(name)) {
        return f;
      }
    }

    IJavaClassField match = findDeclaredField( cls, name );
    if ( match != null ) {
      return match;
    }

    throw new IllegalArgumentException("No field named " + name + " found starting from class " + cls);
  }
1122874
@Override
    public void visitField(Field obj) {
        if (checkConfusedName(obj.getName(), obj.getSignature())) {
            bugReporter.reportBug(new BugInstance(this, BugType.CNC_COLLECTION_NAMING_CONFUSION.name(), NORMAL_PRIORITY).addClass(this).addField(this)
                    .addString(obj.getName()));
        }
    }