system/src/sc/lang/java/ModelUtil.java
public static List mergeProperties(List modProps, List declProps, boolean replace, boolean includeAssigns) {
      if (modProps == null)
         return declProps;
      if (declProps == null)
         return modProps;
      if (!(modProps instanceof ArrayList) && declProps.size() > 0)
         modProps = new ArrayList(modProps);
      for (int i = 0; i < declProps.size(); i++) {
         Object prop = declProps.get(i);
         if (prop == null)
            continue;
         if (includeAssigns && isReverseBinding(prop))
            modProps.add(prop);
         else {
            int ix = propertyIndexOf(modProps, prop, true);
            if (ix == -1)
               modProps.add(prop);
            else if (replace)
               modProps.set(ix, prop);
            else {
               // Get method overrides the field
               Object modProp = modProps.get(ix);
               if (ModelUtil.isGetMethod(prop) && ModelUtil.isField(modProp))
                  modProps.set(ix, prop);
            }
         }
      }
      return modProps;
   }
/** Merges property lists, modifying the first argument, adding any new entries, replacing entries in declProps */
Merges property lists, modifying the first argument, adding any new entries, replacing entries in declProps
Merges property lists modifying the first argument adding any new entries replacing entries in declProps
public static List mergeProperties(List modProps, List declProps, boolean replace, boolean includeAssigns) {
      if (modProps == null)
         return declProps;
      if (declProps == null)
         return modProps;
      if (!(modProps instanceof ArrayList) && declProps.size() > 0)
         modProps = new ArrayList(modProps);
      for (int i = 0; i < declProps.size(); i++) {
         Object prop = declProps.get(i);
         if (prop == null)
            continue;
         if (includeAssigns && isReverseBinding(prop))
            modProps.add(prop);
         else {
            int ix = propertyIndexOf(modProps, prop, true);
            if (ix == -1)
               modProps.add(prop);
            else if (replace)
               modProps.set(ix, prop);
            else {
               Object modProp = modProps.get(ix);
               if (ModelUtil.isGetMethod(prop) && ModelUtil.isField(modProp))
                  modProps.set(ix, prop);
            }
         }
      }
      return modProps;
   }
public static List mergeProperties ( List modProps , List declProps , boolean replace , boolean includeAssigns ) { if ( modProps == null ) return declProps ; if ( declProps == null ) return modProps ; if ( ! ( modProps instanceof ArrayList ) && declProps . size ( ) > 0 ) modProps = new ArrayList ( modProps ) ; for ( int i = 0 ; i < declProps . size ( ) ; i ++ ) { Object prop = declProps . get ( i ) ; if ( prop == null ) continue ; if ( includeAssigns && isReverseBinding ( prop ) ) modProps . add ( prop ) ; else { int ix = propertyIndexOf ( modProps , prop , true ) ; if ( ix == - 1 ) modProps . add ( prop ) ; else if ( replace ) modProps . set ( ix , prop ) ; else { Object modProp = modProps . get ( ix ) ; if ( ModelUtil . isGetMethod ( prop ) && ModelUtil . isField ( modProp ) ) modProps . set ( ix , prop ) ; } } } return modProps ; }
Merges property lists, modifying the first argument, adding any new entries, replacing entries in declProps
Merges property lists modifying the first argument adding any new entries replacing entries in declProps
// Get method overrides the field