static synchronized Object getCachedWrapperFor(Object key) throws RemoteException { Object value = storage.get(key); if (value == null) { if (key instanceof TemplateModel) { int extraTypes; if (key instanceof DebugConfigurationModel) { extraTypes = DebugModel.TYPE_CONFIGURATION; } else if (key instanceof DebugTemplateModel) { extraTypes = DebugModel.TYPE_TEMPLATE; } else { extraTypes = 0; } value = new RmiDebugModelImpl((TemplateModel) key, extraTypes); } else if (key instanceof Environment) { value = new RmiDebuggedEnvironmentImpl((Environment) key); } else if (key instanceof Template) { value = new DebugTemplateModel((Template) key); } else if (key instanceof Configuration) { value = new DebugConfigurationModel((Configuration) key); } } if (value != null) { storage.put(key, value); } if (value instanceof Remote) { remotes.add(value); } return value; }
static synchronized Object getCachedWrapperFor(Object key) throws RemoteException { Object value = storage.get(key); if (value == null) { if (key instanceof TemplateModel) { int extraTypes; if (key instanceof DebugConfigurationModel) { extraTypes = DebugModel.TYPE_CONFIGURATION; } else if (key instanceof DebugTemplateModel) { extraTypes = DebugModel.TYPE_TEMPLATE; } else { extraTypes = 0; } value = new RmiDebugModelImpl((TemplateModel) key, extraTypes); } else if (key instanceof Environment) { value = new RmiDebuggedEnvironmentImpl((Environment) key); } else if (key instanceof Template) { value = new DebugTemplateModel((Template) key); } else if (key instanceof Configuration) { value = new DebugConfigurationModel((Configuration) key); } } if (value != null) { storage.put(key, value); } if (value instanceof Remote) { remotes.add(value); } return value; }
static synchronized Object getCachedWrapperFor(Object key) throws RemoteException { Object value = storage.get(key); if (value == null) { if (key instanceof TemplateModel) { int extraTypes; if (key instanceof DebugConfigurationModel) { extraTypes = DebugModel.TYPE_CONFIGURATION; } else if (key instanceof DebugTemplateModel) { extraTypes = DebugModel.TYPE_TEMPLATE; } else { extraTypes = 0; } value = new RmiDebugModelImpl((TemplateModel) key, extraTypes); } else if (key instanceof Environment) { value = new RmiDebuggedEnvironmentImpl((Environment) key); } else if (key instanceof Template) { value = new DebugTemplateModel((Template) key); } else if (key instanceof Configuration) { value = new DebugConfigurationModel((Configuration) key); } } if (value != null) { storage.put(key, value); } if (value instanceof Remote) { remotes.add(value); } return value; }