system/src/sc/lang/java/ModelUtil.java
public static boolean sameMethodInLayer(LayeredSystem sys, Object m1, Object m2) {
      if (ModelUtil.sameMethods(m1, m2)) {
         Object enc1 = ModelUtil.getEnclosingType(m1);
         Object enc2 = ModelUtil.getEnclosingType(m2);
         if (ModelUtil.sameTypes(enc1, enc2)) {
            Layer l1 = ModelUtil.getLayerForType(sys, enc1);
            Layer l2 = ModelUtil.getLayerForType(sys, enc2);
            if (l1 == l2 || l1 != null && l2 != null && l1.getLayerName().equals(l2.getLayerName()))
               return true;
         }
      }
      return false;
   }
/**
    * Returns true for two methods which are not only the same name, signature but also defined in the same layer.
    * Will consider two methods in
    * different runtimes but the same layer the same method.
    */
Returns true for two methods which are not only the same name, signature but also defined in the same layer.
Will consider two methods in
different runtimes but the same layer the same method.
Returns true for two methods which are not only the same name signature but also defined in the same layer . Will consider two methods in different runtimes but the same layer the same method .
public static boolean sameMethodInLayer(LayeredSystem sys, Object m1, Object m2) {
      if (ModelUtil.sameMethods(m1, m2)) {
         Object enc1 = ModelUtil.getEnclosingType(m1);
         Object enc2 = ModelUtil.getEnclosingType(m2);
         if (ModelUtil.sameTypes(enc1, enc2)) {
            Layer l1 = ModelUtil.getLayerForType(sys, enc1);
            Layer l2 = ModelUtil.getLayerForType(sys, enc2);
            if (l1 == l2 || l1 != null && l2 != null && l1.getLayerName().equals(l2.getLayerName()))
               return true;
         }
      }
      return false;
   }
public static boolean sameMethodInLayer ( LayeredSystem sys , Object m1 , Object m2 ) { if ( ModelUtil . sameMethods ( m1 , m2 ) ) { Object enc1 = ModelUtil . getEnclosingType ( m1 ) ; Object enc2 = ModelUtil . getEnclosingType ( m2 ) ; if ( ModelUtil . sameTypes ( enc1 , enc2 ) ) { Layer l1 = ModelUtil . getLayerForType ( sys , enc1 ) ; Layer l2 = ModelUtil . getLayerForType ( sys , enc2 ) ; if ( l1 == l2 || l1 != null && l2 != null && l1 . getLayerName ( ) . equals ( l2 . getLayerName ( ) ) ) return true ; } } return false ; }
Returns true for two methods which are not only the same name, signature but also defined in the same layer.
Returns true for two methods which are not only the same name signature but also defined in the same layer .