}
private void interceptSetter(Method method, Object obj, Object[] args) throws Throwable {
PropertyMeta propertyMeta = this.setterMetas.get(method);
DirtyChecker dirtyChecker = null;
boolean removeField = false;
if (args[0] == null) {
removeField = true;
}
switch (propertyMeta.type()) {
case SIMPLE:
dirtyChecker = new SimpleDirtyChecker(propertyMeta);
break;
case SET:
dirtyChecker = new DirtyChecker(propertyMeta);
if (removeField)
dirtyChecker.removeAllElements();
else
dirtyChecker.assignValue((Set) args[0]);
break;
case LIST:
dirtyChecker = new DirtyChecker(propertyMeta);
if (removeField)
dirtyChecker.removeAllElements();
else
dirtyChecker.assignValue((List) args[0]);
break;
case MAP:
dirtyChecker = new DirtyChecker(propertyMeta);
if (removeField)
dirtyChecker.removeAllElements();
else
dirtyChecker.assignValue((Map) args[0]);
break;
case COUNTER:
throw new UnsupportedOperationException(
"Cannot set value directly to a Counter type. Please call the getter first to get handle on the wrapper");
default: