system/src/sc/lang/SemanticNode.java
public int replaceChild(Object toReplace, Object other) {
      DynType type = TypeUtil.getPropertyCache(getClass());
      IBeanMapper[] semanticProps = type.getSemanticPropertyList();

      for (int i = 0; i < semanticProps.length; i++) {
         IBeanMapper prop = semanticProps[i];
         // Not sure why this one is using the property, not the field
         Object thisProp = PTypeUtil.getProperty(this, prop.getField(), false);
         if (thisProp == toReplace) {
            setProperty(prop, other);
            return i;
         }
      }
      return -1;
   }
/**
    * Provided with another semantic node that should be type equivalent with this one, we first
    * find this node in the parent's value;
    */
Provided with another semantic node that should be type equivalent with this one, we first
find this node in the parent's value.
Provided with another semantic node that should be type equivalent with this one we first find this node in the parent ' s value .
public int replaceChild(Object toReplace, Object other) {
      DynType type = TypeUtil.getPropertyCache(getClass());
      IBeanMapper[] semanticProps = type.getSemanticPropertyList();
      for (int i = 0; i < semanticProps.length; i++) {
         IBeanMapper prop = semanticProps[i];
         Object thisProp = PTypeUtil.getProperty(this, prop.getField(), false);
         if (thisProp == toReplace) {
            setProperty(prop, other);
            return i;
         }
      }
      return -1;
   }
public int replaceChild ( Object toReplace , Object other ) { DynType type = TypeUtil . getPropertyCache ( getClass ( ) ) ; IBeanMapper [ ] semanticProps = type . getSemanticPropertyList ( ) ; for ( int i = 0 ; i < semanticProps . length ; i ++ ) { IBeanMapper prop = semanticProps [ i ] ; Object thisProp = PTypeUtil . getProperty ( this , prop . getField ( ) , false ) ; if ( thisProp == toReplace ) { setProperty ( prop , other ) ; return i ; } } return - 1 ; }
Provided with another semantic node that should be type equivalent with this one, we first
 find this node in the parent's value;
Provided with another semantic node that should be type equivalent with this one we first find this node in the parent ' s value ;
// Not sure why this one is using the property, not the field