a field is receiving a new value (in)

@throws java.lang.Exception
766065
@Override
    public void in() throws Exception {
        if (data == null) {
//             throw new ComponentException("Not connected: " + toString());
            if (log.isLoggable(Level.WARNING)) {
                log.warning("@In not connected : " + toString() + ", using default value.");
            }
            return;
        }
        Object val = data.getValue();
        // fire only if there is a listener
        if (ens.shouldFire()) {
            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
//            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
            ens.fireIn(e);
            // the value might be altered
            val = e.getValue();
        }
        
        // type conversion
        
        if (val != null && field.getType() != val.getClass() && !field.getType().isAssignableFrom(val.getClass())) {
//            // default type conversion fails, we need to convert.
//            // this will use the Conversions SPI.
            val = Conversions.convert(val, field.getType());
        }

//        access.pass((Access) val);
        setFieldValue(val);
    }
1301217
private void tryToSetParsedValue(String value) throws Exception {

        JSONObject json = JSONParser.parseStrict(value).isObject();
        JSONValue val = json.get(JsonKey.START);
        setStart(readOptionalDate(val));
        val = json.get(JsonKey.END);
        setEnd(readOptionalDate(val));
        setWholeDay(readOptionalBoolean(json.get(JsonKey.WHOLE_DAY)));
        JSONObject patternJson = json.get(JsonKey.PATTERN).isObject();
        readPattern(patternJson);
        setExceptions(readDates(json.get(JsonKey.EXCEPTIONS)));
        setSeriesEndDate(readOptionalDate(json.get(JsonKey.SERIES_ENDDATE)));
        setOccurrences(readOptionalInt(json.get(JsonKey.SERIES_OCCURRENCES)));
        setDerivedEndType();
        setCurrentTillEnd(readOptionalBoolean(json.get(JsonKey.CURRENT_TILL_END)));
        setParentSeriesId(readOptionalUUID(json.get(JsonKey.PARENT_SERIES)));

    }
422023
public void update (T value)
    {
        // store our new current value
        _value = value;

        // notify our listeners; we snapshot our listeners before iterating to avoid problems if
        // listeners add or remove themselves while we're dispatching this notification
        for (Listener<T> listener : new ArrayList<Listener<T>>(_listeners)) {
            listener.valueChanged(value);
        }
    }
1135402
public void setValue(byte[] newValue) throws Exception
    {
        Preconditions.checkState(state.get() == State.STARTED, "not started");

        Stat result = client.setData().forPath(path, newValue);
        updateValue(result.getVersion(), Arrays.copyOf(newValue, newValue.length));
    }
544578
public void setField(Object o, String fieldName, Object newValue) {
        if (o == null) {
            throw new IllegalArgumentException("No object to set on provided");
        }
        Field field = findField(o, fieldName);
        if (field == null) {
            throw new IllegalArgumentException(o.getClass() + " does not have a field " + fieldName);
        } else {
            if (!field.isAccessible()) {
                field.setAccessible(true);
            }
            try {
                field.set(o, newValue);
            } catch (IllegalAccessException e) {
                throw new IllegalArgumentException("Unable to set " + newValue + " for " + fieldName, e);
            }
        }
    }
75675
@Override
    public void out() throws Exception {
        Object val = fa.getFieldValue();
//        Object val = access;

        if (ens.shouldFire()) {
            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
////            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
            ens.fireOut(e);
//            // the value might be altered
            val = e.getValue();
        }
        // if data==null this unconsumed @Out, its OK but we do not want to set it.
        if (data != null) {
            data.setFieldValue(val);
        }
        fa.out();
    }
971097
public void add(int theField, int theValue) {
		switch (theField) {
		case Calendar.YEAR:
			setValue(DateUtils.addYears(getValue(), theValue), getPrecision());
			break;
		case Calendar.MONTH:
			setValue(DateUtils.addMonths(getValue(), theValue), getPrecision());
			break;
		case Calendar.DATE:
			setValue(DateUtils.addDays(getValue(), theValue), getPrecision());
			break;
		case Calendar.HOUR:
			setValue(DateUtils.addHours(getValue(), theValue), getPrecision());
			break;
		case Calendar.MINUTE:
			setValue(DateUtils.addMinutes(getValue(), theValue), getPrecision());
			break;
		case Calendar.SECOND:
			setValue(DateUtils.addSeconds(getValue(), theValue), getPrecision());
			break;
		case Calendar.MILLISECOND:
			setValue(DateUtils.addMilliseconds(getValue(), theValue), getPrecision());
			break;
		default:
			throw new IllegalArgumentException("Unknown field constant: " + theField);
		}
	}
981989
@Override
    public void put(String key, String value) throws Exception{
        try {
            Object valueObj = datatypeMap.get(key).parse(value);
            generator.writeObjectField(key, valueObj);
        } catch (ParseException e) {
            throw new ParseException("Value " + value + " is not type "
                    + datatypeMap.get(key).name(), 0);
        } catch (Exception e) {
            String msg = e.getMessage();
            if (!msg.contains("missing value")) {
                throw new Exception(msg);
            }
        }       
        
    }
136517
function(value, sendUpdatedEvt) {
	   
	   if(!lang.isArray(value) ) {
	      throw new Error("inputEx.ListField.setValue expected an array, got "+(typeof value));
	   }
	      
	   // Set the values (and add the lines if necessary)
	   for(var i = 0 ; i < value.length ; i++) {
	      if(i == this.subFields.length) {
	         this.addElement(value[i]);
	      }
	      else {
	         this.subFields[i].setValue(value[i], false);
	      }
	   }
	      
	   // Remove additional subFields
	   var additionalElements = this.subFields.length-value.length;
	   if(additionalElements > 0) {
	      for(i = 0 ; i < additionalElements ; i++) { 
	         this.removeElement(value.length);
	      }
	   }
	   
	   inputEx.ListField.superclass.setValue.call(this, value, sendUpdatedEvt);
	}
262797
public void readFields(DataInput in) throws IOException {
    int appIdLength = in.readInt();
    this.appId = new byte[appIdLength];
    in.readFully(appId);
    this.maxCount = in.readInt();
  }
182462
public void addValueToField(String fieldName, Object value) {
		add(new SimpleUpdateField(fieldName, value, UpdateAction.ADD));
	}
19675
private void setObjectToTargetField(String fieldname, Object value) throws Exception {
        Object toWrite = null;
        if (fieldname.contains(".")) {
            String path = StringUtils.substringBeforeLast(fieldname, ".");
            toWrite = getObjectValue(path, false);
        }
        if (toWrite == null && isTemporaryField(fieldname)) {
            String mapKey = StringUtils.substringAfter(fieldname, "#");
            mapKey = StringUtils.substringBefore(mapKey, ".");
            temporaryFields.put(mapKey, value);
            return;
        }
        String realFieldName = fieldname.contains(".") ? StringUtils.substringAfterLast(fieldname, ".") : fieldname;
        writeObjectToField(realFieldName, value, toWrite, target);
    }
1334538
@Override
    public void out() throws Exception {
        Object val = fa.getFieldValue();
//        Object val = access;

//        if (ens.shouldFire()) {
//            DataflowEvent e = new DataflowEvent(ens.getController(), this, val);
////            DataflowEvent e = new DataflowEvent(ens.getController(), this, access.toObject());
//            ens.fireOut(e);
//            // the value might be altered
//            val = e.getValue();
//        }
        // if data==null this unconsumed @Out, its OK but we do not want to set it.
        if (fa.getData() != null) {
            fa.getData().setValue0(val);
        }
        fa.out();
    }
789349
public void setValue(String fieldName, String value) {
    int index = getFieldIndex(fieldName);
    assert(index != -1);
    values[index] = value;
  }
648275
public void addValue(Object current, Object value) throws ParseException, IOException {
		throw new RuntimeException(ERR_MSG + " addValue(Object current, Object value) in " + this.getClass());
	}
1147897
private void writeIntegerField(String fieldName, Object value) throws IOException
   {
      int val = ((Number) value).intValue();
      if (val != 0)
      {
         m_writer.writeNameValuePair(fieldName, val);
      }
   }
303640
@SuppressWarnings("unchecked")
  private void setValue(Object instance, Field field, String value) throws IllegalAccessException {
    if (!field.isAccessible()) {
      field.setAccessible(true);
    }

    Class<?> fieldType = field.getType();

    // Currently only String, primitive (or boxed type) and Enum type are supported.
    if (String.class.equals(fieldType)) {
      field.set(instance, value);
      return;
    }
    if (fieldType.isEnum()) {
      field.set(instance, Enum.valueOf((Class<? extends Enum>) fieldType, value));
      return;
    }

    if (fieldType.isPrimitive()) {
      fieldType = com.google.common.primitives.Primitives.wrap(fieldType);
    }

    try {
      // All box type has the valueOf(String) method.
      field.set(instance, fieldType.getMethod("valueOf", String.class).invoke(null, value));
    } catch (NoSuchMethodException e) {
      // Should never happen, as boxed type always have the valueOf(String) method.
      throw Throwables.propagate(e);
    } catch (InvocationTargetException e) {
      // Also should never happen, as calling method on Java bootstrap classes should always succeed.
      throw Throwables.propagate(e);
    }
  }