system/src/sc/layer/LayeredSystem.java
public boolean isRootedObject(Object obj) {
      if (obj instanceof java.lang.Enum || obj instanceof DynEnumConstant)
         return true;
      if (objectNameIndex.get(obj) == null) {
         // Also check for a compiled object annotation - needed for when liveDynamicTypes is disabled and we are not tracking the objects
         Object typeObj = DynUtil.getSType(obj);
         // Layers define themselves as of type Object but are not rooted objects since we can't access them from a static reference.
         if (!ModelUtil.isObjectType(typeObj) || ((typeObj instanceof ModifyDeclaration) && ((ModifyDeclaration) typeObj).isLayerType))
            return false;
      }
      Object outer = DynUtil.getOuterObject(obj);
      if (outer == null)
         return true;
      return isRootedObject(outer);
   }
/** Can we reach this instance via a path name from a root type. */
Can we reach this instance via a path name from a root type.
Can we reach this instance via a path name from a root type .
public boolean isRootedObject(Object obj) {
      if (obj instanceof java.lang.Enum || obj instanceof DynEnumConstant)
         return true;
      if (objectNameIndex.get(obj) == null) {
         Object typeObj = DynUtil.getSType(obj);
         if (!ModelUtil.isObjectType(typeObj) || ((typeObj instanceof ModifyDeclaration) && ((ModifyDeclaration) typeObj).isLayerType))
            return false;
      }
      Object outer = DynUtil.getOuterObject(obj);
      if (outer == null)
         return true;
      return isRootedObject(outer);
   }
public boolean isRootedObject ( Object obj ) { if ( obj instanceof java . lang . Enum || obj instanceof DynEnumConstant ) return true ; if ( objectNameIndex . get ( obj ) == null ) { Object typeObj = DynUtil . getSType ( obj ) ; if ( ! ModelUtil . isObjectType ( typeObj ) || ( ( typeObj instanceof ModifyDeclaration ) && ( ( ModifyDeclaration ) typeObj ) . isLayerType ) ) return false ; } Object outer = DynUtil . getOuterObject ( obj ) ; if ( outer == null ) return true ; return isRootedObject ( outer ) ; }
Can we reach this instance via a path name from a root type.
Can we reach this instance via a path name from a root type .
// Also check for a compiled object annotation - needed for when liveDynamicTypes is disabled and we are not tracking the objects // Layers define themselves as of type Object but are not rooted objects since we can't access them from a static reference.