Get the {@code Object} representing the current value of the field for this object.
@return A boxed value even if the underlying field is a primitive. will not be null.
330134
public Object getArgumentValue() {
        try {
            return getUnderlyingField().get(getContainingObject());
        } catch (final IllegalAccessException e) {
            throw new CommandLineException.ShouldNeverReachHereException(
                    "This shouldn't happen since we setAccessible(true).", e);
        }
    }
278379
@Override
	public synchronized T get() {
		@Nullable T checkedObject = this.object;

		if (checkedObject == null) {
			this.object = checkedObject = Objects.requireNonNull(this.initializer.get());
		}
		return checkedObject;
	}
357190
public static Object getFieldValue(Field field, Object obj) {
    try {
      return field.get(obj);
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException(e);
    }
  }
942179
public Class<?> box(Class<?> primitive) {
        if (!primitive.isPrimitive()) {
            return primitive;
        }

        if (int.class.equals(primitive)) {
            return Integer.class;
        } else if (long.class.equals(primitive)) {
            return Long.class;
        } else if (float.class.equals(primitive)) {
            return Float.class;
        } else if (double.class.equals(primitive)) {
            return Double.class;
        } else if (short.class.equals(primitive)) {
            return Short.class;
        } else if (boolean.class.equals(primitive)) {
            return Boolean.class;
        } else if (char.class.equals(primitive)) {
            return Character.class;
        } else if (byte.class.equals(primitive)) {
            return Byte.class;
        }

        throw new IllegalArgumentException("Unknown primitive type " + primitive);
    }
1311374
public Object getAsObject() {
		Map<String, Object> result = new HashMap<String, Object>();
		for (Map.Entry<String, Object> entry : this.entrySet())
			result.put(entry.getKey(), entry.getValue());
		return result;
	}
205318
public static Object getFieldValue(Object obj, Field field) {
        Object value = null;
        boolean accessible = field.isAccessible();
        //hack accessibility
        if (!accessible) {
            field.setAccessible(true);
        }
        try {
            value = field.get(obj);
        } catch (IllegalAccessException e) {
            //ignore should not happen as accessibility has been updated to suit assignment
            e.printStackTrace(); // $COVERAGE-IGNORE$
        }
        //restore accessibility
        field.setAccessible(accessible);
        return value;
    }
947541
public @Nonnull Object getRoot() {
    Chain current = this;
    while (current.hasParent()) {
      current = current.getParent();
    }
    return current.getValue();
  }
982548
@Ignore
  public ValueBoxBase<String> getValueBox() {
    if (getTakesValues() instanceof SuggestBox) {
      return ((SuggestBox) getTakesValues()).getValueBox();
    }
    return null;
  }
1157180
public static Object getObjectFieldValue( Object object, String fieldName )
            throws UtilEvalError, ReflectError {
        if ( object instanceof This ) {
            return ((This) object).namespace.getVariable( fieldName );
        } else if( object == Primitive.NULL ) {
            throw new UtilTargetError( new NullPointerException(
                "Attempt to access field '" +fieldName+"' on null value" ) );
        } else {
            try {
                return getFieldValue(
                    object.getClass(), object, fieldName, false/*onlystatic*/);
            } catch ( ReflectError e ) {
                // no field, try property access
                if ( hasObjectPropertyGetter( object.getClass(), fieldName ) )
                    return getObjectProperty( object, fieldName );
                else
                    throw e;
            }
        }
    }
912310
private Object getObjectValue(Node node, String fieldName) {
        // we have to take into account the fact that fieldName will be in the lower case
        if (node != null) {
            String name = node.getLocalName();
            switch (node.getNodeType()) {
                case Node.ATTRIBUTE_NODE:
                    return name.equalsIgnoreCase(fieldName) ? node : null;
                case Node.ELEMENT_NODE: {
                    if (name.equalsIgnoreCase(fieldName)) {
                        return new NodeArray(node.getChildNodes());
                    } else {
                        NamedNodeMap namedNodeMap = node.getAttributes();
                        for (int attributeIndex = 0; attributeIndex < namedNodeMap.getLength(); ++attributeIndex) {
                            Node attribute = namedNodeMap.item(attributeIndex);
                            if (attribute.getLocalName().equalsIgnoreCase(fieldName)) {
                                return attribute;
                            }
                        }
                        return null;
                    }
                }
                default:
                    return null;
            }
        }
        return null;
    }
388595
public Object getData() 
    {
        Object objKey = this.getField().getData();
        Object objValue = null;
        if (this.isCacheValue(objKey))
            objValue = this.getCacheValue(objKey);
        else
        {
            objValue = super.getData();
            this.cacheValue(objKey, objValue);
        }
        return objValue;
    }
104017
public Object getData() 
    {
        try {
            Object objValue = super.getData();    // Get the actual key data.
            if (objValue == null)
                objValue = m_strNullValue;
            if (objValue == null)
                return null;
            if (objValue.getClass() == m_fieldKey.getDataClass())
                m_fieldKey.setData(objValue);
            else
                m_fieldKey.setString(objValue.toString());
            if (m_record.getTable().seek(null) == true)  // I use get, so the index matches the index of JComboBox
                return m_fieldData.getData();
        } catch (Exception ex)  {
            ex.printStackTrace();
        }
        return null;
    }
476513
public Object getFieldValue(final Object instance) {
        try {
            return field.get(instance);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
1100907
public FieldType getField()
   {
      FieldType result = null;
      if (m_index < m_fields.length)
      {
         result = m_fields[m_index++];
      }

      return result;
   }
1178177
private Object getFieldValue(final Field field) {
        Object field_value = AccessController.doPrivileged(new PrivilegedAction<Object>() {
            @Override
            public Object run() {
                try {
                    Object value = field.get(_member);

                    // Don't dump sensitive data
                    boolean sensitive = _member.getClass().isAnnotationPresent(Sensitive.class) || field.isAnnotationPresent(Sensitive.class);
                    if (value != null && sensitive) {
                        value = DataFormatHelper.sensitiveToString(value);
                    }

                    return value;
                } catch (IllegalAccessException e) {
                    // No FFDC code needed - we're in the middle of FFDC'ing!
                    // Should not happen - if it does return a string :-)
                    return "/* Could not access " + field.getName() + " */";
                }
            }
        });
        return field_value;
    }
299246
public <V> V getValue() {
        if (values == null || values.isEmpty()) {
            return null;
        }
        return (V)values.get(0);
    }
40535
public T getValue(Object obj) throws IllegalAccessException, InvocationTargetException {
		if (field == null) {
			@SuppressWarnings("unchecked")
			T cast = (T) getMethod.invoke(obj);
			return cast;
		} else {
			@SuppressWarnings("unchecked")
			T cast = (T) field.get(obj);
			return cast;
		}
	}