コード例 #1
0
 public OclBoolean OclModelElement_oclIsUndefined(OclAny o1) {
   OclBoolean res =
       processor
           .getStdLibGenerationAdapter()
           .Boolean("new Boolean(" + o1.asJavaObject() + " == null" + ")");
   ((Impl) res)
       .setInitialisation(((Impl) o1).getInitialisation() + ((Impl) res).getInitialisation());
   return res;
 }
コード例 #2
0
 // --- OclModelElement
 public OclBoolean OclModelElement_equalTo(OclAny obj1, OclAny obj2) {
   if (obj1 instanceof OclAnyImpl && obj2 instanceof OclAnyImpl) {
     OclAnyImpl object1 = (OclAnyImpl) obj1;
     OclAnyImpl object2 = (OclAnyImpl) obj2;
     OclBooleanImpl result =
         (OclBooleanImpl)
             processor
                 .getStdLibGenerationAdapter()
                 .Boolean(
                     "new Boolean(("
                         + obj1.asJavaObject()
                         + ").equals("
                         + object2.asJavaObject()
                         + "))");
     result.setInitialisation(
         object1.getInitialisation() + object2.getInitialisation() + result.getInitialisation());
     return result;
   }
   return null;
 }