}
}
public static void __assign(Object modified, Object newValue) {
if (newValue instanceof Resource && modified instanceof Entity) {
Resource v = (Resource) newValue;
if (((Object)v.__getController()) instanceof ThreadStagingArea) {
Entity m = (Entity) modified;
while (m instanceof Resource && m != newValue) {
m = ((Resource)m).__getController();
}
if (!(m instanceof Resource)) {
v.__setControl((Entity)modified);
// System.err.println ("passed " + v + " to " + modified);
// for (StackTraceElement e : Thread.currentThread().getStackTrace()) {
// System.err.println(e.toString());
// }
}