@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; }
} else if (v instanceof InstanceValue) { InstanceValue instanceValue = (InstanceValue) v; return UmlgClassOperations.getPathName(instanceValue.getType()).getTypeName() + "." + instanceValue.getInstance().getName(); } else { throw new RuntimeException(String.format("ValueSpecification %s not supported", v.getClass().getSimpleName()));