@Override public Object caseInstanceValue(InstanceValue instanceValue) { Type type = instanceValue.getType(); if (type instanceof Enumeration) { instanceValue.setInstance(((Enumeration) type) .getOwnedLiteral(newValue)); } else { InstanceSpecification instance = instanceValue .getInstance(); if (instance != null) { ValueSpecification specification = instance .getSpecification(); if (specification != null) { return doSwitch(specification); } } return null; } return instanceValue; }