Compute the target value.
@param srcValue The value of this listener's owner.
@return The value to set the target field to.
332825
public double computeValue(double srcValue)
    {
        double dateOtherDate = 0;
        double dateThisDate = 0;
        if (m_fldOtherDate != null)
            dateOtherDate = m_fldOtherDate.getValue();
        else
            dateOtherDate = DateField.todaysDate();
        dateThisDate = ((DateTimeField)this.getOwner()).getValue();
        double tsDifference = (Math.floor((dateThisDate - dateOtherDate + 0.5)) / DBConstants.KMS_IN_A_DAY);  // Rounded number of days
        return tsDifference;    // Difference between this date and target
    }
629986
public void setValue(IPrimitiveType<Date> theValue) {
		if (theValue != null) {
			myValue.setValueAsString(theValue.getValueAsString());
		} else {
			myValue.setValue(null);
		}
	}
259964
public void setValue(final Object targetObj, final Object value) {
        ArgUtils.notNull(targetObj, "targetObj");
        
        if(targetSetter.isPresent()) {
            try {
                targetSetter.get().invoke(targetObj, value);
            } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
                throw new FieldAccessException(this, "fail setter value", e);
            }
            
        } else if(targetField.isPresent()) {
            try {
                targetField.get().set(targetObj, value);
                
            } catch (IllegalArgumentException | IllegalAccessException e) {
                throw new FieldAccessException(this, "fail setter field value", e);
            }
            
        } else {
            throw new FieldAccessException(this, "not found setter method or field.");
        }
    }
187871
@SuppressWarnings("unchecked")
	public static <T> T getValueOf(Field field, Object reference, Class<?> referenceClazz, Class<T> valueType) {
		try {
			field.setAccessible(true);
			Object toReturn = (T) field.get(reference);
			if (String.class.isInstance(valueType.getClass()) && !String.class.isInstance(toReturn.getClass())) {
				toReturn = toReturn.toString();
			}
			return (T) toReturn;
		} catch (Exception e) {
			log.warning(e.getClass().getSimpleName() + ": " + e.getMessage());
			return null;
		}
	}
570730
@Override
    public Object getValue(Object instance, String propertyName) {
        PropertyAccessor accessor = PropertyProxyUtils.getPropertyAccessor(this.conversionService, this.useDirectFieldAccess, instance);
        Object value = accessor.getPropertyValue(propertyName);
        if(log.isDebugEnabled()) {
            getType(instance, propertyName);
            log.debug("Actual type of value for property '"+propertyName+"' on instance "+instance+" is "+(value != null ? value.getClass() : null));
        }
        
        TypeDescriptor targetType = accessor.getPropertyTypeDescriptor(propertyName);
        TypeDescriptor sourceType = value == null ? targetType : TypeDescriptor.valueOf(value.getClass());
        if (this.conversionService.canConvert(sourceType, targetType)) {
            value = this.conversionService.convert(value, sourceType, targetType);
        }
        return value;
    }
654738
public V getValue(T object) {
        try {
            if (this.getMethod != null) {
                return (V)this.getMethod.invoke(object);
            } else {
                return (V)this.field.get(object);
            }
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
205580
public BeanBox injectValue(String fieldName, Object constValue) {
		checkOrCreateFieldInjects();
		Field f = ReflectionUtils.findField(beanClass, fieldName);
		BeanBox inject = new BeanBox();
		inject.setTarget(constValue);
		inject.setType(f.getType());
		inject.setPureValue(true);
		ReflectionUtils.makeAccessible(f);
		this.getFieldInjects().put(f, inject);
		return this;
	}
20817
public final void setGuaranteedRemoteGetValueTick(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedRemoteGetValueTick", Long.valueOf(value));
        getHdr2().setLongField(JsHdr2Access.GUARANTEEDREMOTEGET_SET_VALUETICK, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedRemoteGetValueTick");
    }
966733
public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode)
    {
        String strButtonDesc = this.getButtonDesc();
        String strButtonCommand = this.getButtonCommand();
        if (strButtonCommand != null)
            if (strButtonDesc != null)
                if (strButtonDesc.equals(strParamValue))
        {   // Button was pressed, do command
            this.handleCommand(strButtonCommand, this, ScreenConstants.USE_NEW_WINDOW);
            return DBConstants.NORMAL_RETURN;
        }
        // Often this is called in a report needing a value set, so set it:
        return super.setSFieldValue(strParamValue, bDisplayOption, iMoveMode);
    }
273894
public static Long getValue(final Long value, final Long defaultValue) {

    return value == null ? defaultValue : value;
  }
963656
static Object createValueList(Field targetField,Class<?> targetFieldType,Object targetObject,Object originValue) {
		if(originValue == null){
			return null;
		}
		
		List<?> originList = (List<?>)originValue;
		if(originList.size() == 0){
			return null;
		}
		
		Class<?> proxyType = originList.get(0).getClass();

//		Type type = targetField.getGenericType();
//		Type[] types = (Type[]) ReflectUtil.getFieldVal(type, "actualTypeArguments");
//		System.out.println(types);
//		Class<?> proxyType = null;
//		try {
//			System.out.println(ReflectUtil.getFieldVal(types[0], "name").toString());
//			proxyType = Class.forName(ReflectUtil.getFieldVal(types[0], "name").toString());
//		} catch (ClassNotFoundException e) {
//			e.printStackTrace();
//			return null;
//		}
		
		
		List<Object> targetList = new ArrayList<Object>();
		
		for (Object object : originList) {
			targetList.add(ValueCast.createValueCore(targetField, proxyType, targetList, object));
		}
		return targetList;
		
	}
816354
public static Object setSilent(Object target, String fieldName, Object value) {
		Class<?> targetClass = target.getClass();
		try {
			Field field = targetClass.getDeclaredField(fieldName);
			field.setAccessible(true);
			field.set(target, box(value, field.getType()));
			return target;
		} catch (Exception e) {
			return target;
		}
	}
61077
public static function addBitInt(&$srcValue,$intValue)
    {
        if(empty($srcValue)){
            $srcValue = $intValue;
        }
        else if(($srcValue&$intValue)<=0){
            $srcValue+=$intValue;
        }
        return $srcValue;
    }
179662
public Request referer(String refererValue){
        final String referer = RequestHeaderFields.REFERER.getName();
        return this.setHeader(referer, refererValue);
    }
836838
public static <T> T getFieldValue(Object target, String fieldName) {
        try {
            Field field = target.getClass().getDeclaredField(fieldName);
            field.setAccessible(true);
            @SuppressWarnings("unchecked")
            T returnValue = (T) field.get(target);
            return returnValue;
        } catch (NoSuchFieldException e) {
            throw handleException(fieldName, e);
        } catch (IllegalAccessException e) {
            throw handleException(fieldName, e);
        }
    }
705952
public void setValue(String constantValue)
    {
        this.fieldSource = SOURCE_VALUE;
        this.fieldRefName = null;
        this.returnedByProcedure = false;
        this.constantValue = constantValue;
    }
619643
public final void setGuaranteedValueValueTick(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedValueValueTick", Long.valueOf(value));
        getHdr2().setLongField(JsHdr2Access.GUARANTEEDVALUE_SET_VALUETICK, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedValueValueTick");
    }