// --- Enumeration public OclBoolean EnumLiteral_equalTo(Object obj1, Object obj2) { if (obj1 instanceof OclAnyImpl && obj2 instanceof OclAnyImpl) { OclAnyImpl object1 = (OclAnyImpl) obj1; OclAnyImpl object2 = (OclAnyImpl) obj2; OclBooleanImpl result = (OclBooleanImpl) processor .getStdLibGenerationAdapter() .Boolean( "(" + object1.asJavaObject() + ").equals(" + object2.asJavaObject() + ")"); result.setInitialisation( object1.getInitialisation() + object2.getInitialisation() + result.getInitialisation()); return result; } return null; }
public Object OclModelElement_oclAsType(OclAny o1, OclType type) { Class cls = (Class) type.asJavaObject(); Classifier clsfr = ((OclTypeImpl) type).cls; OclAnyImpl o = (OclAnyImpl) ((StdLibGenerationAdapterImpl) processor.getStdLibGenerationAdapter()) .OclAny(clsfr, "((" + cls.getName() + ")" + o1 + ")"); o.setInitialisation(((OclAnyImpl) o1).getInitialisation() + o.getInitialisation()); return o; }