@Override public Object caseInstanceValue(InstanceValue object) { return object.getInstance(); }
public Object transform(final Object object) { return UmlUtilities.ELEMENT_TRANSFORMER.transform(((InstanceValue)object).getInstance()); } });
public Object transform(final Object object) { return UmlUtilities.ELEMENT_TRANSFORMER.transform(((InstanceValue)object).getInstance()); } });
@Override public boolean filter(Element e) { if (e instanceof Slot) { Slot slot = (Slot)e; for (ValueSpecification valueSpecification : slot.getValues()) { if (valueSpecification instanceof InstanceValue) { InstanceValue instanceValue = (InstanceValue)valueSpecification; InstanceSpecification instanceSpecification = instanceValue.getInstance(); if (instanceSpecification == enumerationLiteral) { return true; } } } } return false; // return e instanceof Slot && ((Slot) e).getDefiningFeature().getType().equals(enumerationLiteral.getOwner()); } });
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated NOT */ public static String stringValue(InstanceValue instanceValue) { InstanceSpecification instance = instanceValue.getInstance(); if (instance instanceof EnumerationLiteral) { return ((EnumerationLiteral) instance).getName(); } else if (instance != null) { ValueSpecification specification = instance.getSpecification(); if (specification != null) { return specification.stringValue(); } } return ValueSpecificationOperations.stringValue(instanceValue); }
@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()));
&& (value instanceof InstanceValue)) { result.add(((InstanceValue) value) .getInstance());
result = getClassifier(((InstanceValue) context).getInstance()); } else if (context instanceof LiteralBoolean) { result = OCLStandardLibraryImpl.INSTANCE.getBoolean();
if (slot.getDefiningFeature() == definingFeature) { InstanceValue instanceValue = (InstanceValue) slot.getValues().get(0); if (instanceValue.getInstance().equals(literal)) { ojSwitchCase.getBody().addToStatements( "result.add(" + if (valueSpecification instanceof InstanceValue) { InstanceValue instanceValue = (InstanceValue) valueSpecification; literalField.setInitExp(UmlgClassOperations.getPathName(structuralFeature.getType()).getLast() + "." + instanceValue.getInstance().getName()); } else if (valueSpecification instanceof LiteralString) { literalField.setInitExp("\"" + ((LiteralString) valueSpecification).getValue() + "\"");