coreRuntime/src/sc/sync/SyncManager.java
public Object resolveOrCreateObject(String currentPackage, Object outerObj, String name, String typeName, boolean unwrap, String sig, Object...args) {
         Object inst = null;
         boolean flushSyncQueue = beginSyncQueue();

         try {
            // For TodoList.TodoItem we do want the prefix here but for UIIcon - the type which contains static UIIcons we don't want UIIcon.UIIcon__0
            if (outerObj != null && !DynUtil.isType(outerObj)) {
               String outerName = findObjectName(outerObj);
               if (outerName != null)
                  name = outerName + '.' + name;
            }
            else
               name = CTypeUtil.prefixPath(currentPackage, name);

            // Passing null here for currentPackage because we already handled currentPackage right above
            inst = resolveObject(null, name, false, unwrap);
            if (inst != null)
               return inst;
            Object type = DynUtil.findType(typeName);
            if (type == null) {
               System.err.println("No type: " + typeName + " for new sync instance");
               return null;
            }
            inst = DynUtil.newInnerInstance(type, outerObj, sig, args);
            boolean isClient = getSyncManager().syncDestination.clientDestination;
            if (!isClient && !allowCreate(type)) {
               System.err.println("Create type not allowed for: " + typeName + " for sync context: " + this);
               return null;
            }
            // Because we always use this to 'receive' a new instance set registered in this SyncContext to keep us from trying to send it back
            registerObjName(inst, args, name, isClient, true, true);
         }
         finally {
            if (flushSyncQueue)
               flushSyncQueue();
         }
         return inst;
      }
/** Returns the object instance with the given name - for runtime lookup. */
Returns the object instance with the given name - for runtime lookup.
Returns the object instance with the given name - for runtime lookup .
public Object resolveOrCreateObject(String currentPackage, Object outerObj, String name, String typeName, boolean unwrap, String sig, Object...args) {
         Object inst = null;
         boolean flushSyncQueue = beginSyncQueue();
         try {
            if (outerObj != null && !DynUtil.isType(outerObj)) {
               String outerName = findObjectName(outerObj);
               if (outerName != null)
                  name = outerName + '.' + name;
            }
            else
               name = CTypeUtil.prefixPath(currentPackage, name);
            inst = resolveObject(null, name, false, unwrap);
            if (inst != null)
               return inst;
            Object type = DynUtil.findType(typeName);
            if (type == null) {
               System.err.println("No type: " + typeName + " for new sync instance");
               return null;
            }
            inst = DynUtil.newInnerInstance(type, outerObj, sig, args);
            boolean isClient = getSyncManager().syncDestination.clientDestination;
            if (!isClient && !allowCreate(type)) {
               System.err.println("Create type not allowed for: " + typeName + " for sync context: " + this);
               return null;
            }
            registerObjName(inst, args, name, isClient, true, true);
         }
         finally {
            if (flushSyncQueue)
               flushSyncQueue();
         }
         return inst;
      }
public Object resolveOrCreateObject ( String currentPackage , Object outerObj , String name , String typeName , boolean unwrap , String sig , Object ... args ) { Object inst = null ; boolean flushSyncQueue = beginSyncQueue ( ) ; try { if ( outerObj != null && ! DynUtil . isType ( outerObj ) ) { String outerName = findObjectName ( outerObj ) ; if ( outerName != null ) name = outerName + '.' + name ; } else name = CTypeUtil . prefixPath ( currentPackage , name ) ; inst = resolveObject ( null , name , false , unwrap ) ; if ( inst != null ) return inst ; Object type = DynUtil . findType ( typeName ) ; if ( type == null ) { System . err . println ( "No type: " + typeName + " for new sync instance" ) ; return null ; } inst = DynUtil . newInnerInstance ( type , outerObj , sig , args ) ; boolean isClient = getSyncManager ( ) . syncDestination . clientDestination ; if ( ! isClient && ! allowCreate ( type ) ) { System . err . println ( "Create type not allowed for: " + typeName + " for sync context: " + this ) ; return null ; } registerObjName ( inst , args , name , isClient , true , true ) ; } finally { if ( flushSyncQueue ) flushSyncQueue ( ) ; } return inst ; }
Returns the object instance with the given name - for runtime lookup.
Returns the object instance with the given name - for runtime lookup .
// For TodoList.TodoItem we do want the prefix here but for UIIcon - the type which contains static UIIcons we don't want UIIcon.UIIcon__0 // Passing null here for currentPackage because we already handled currentPackage right above // Because we always use this to 'receive' a new instance set registered in this SyncContext to keep us from trying to send it back