public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException { throw new ContainerCreateException("createInstance not supported"); //$NON-NLS-1$ }
protected void throwContainerCreateException(String message, Throwable cause, String method) throws ContainerCreateException { ContainerCreateException except = (cause == null) ? new ContainerCreateException(message) : new ContainerCreateException(message, cause); Trace.throwing(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_THROWING, ContainerFactory.class, method, except); throw except; }
private ContainerTypeDescription getDescriptionByNameWithException(String containerTypeDescriptionName) throws ContainerCreateException { ContainerTypeDescription typeDescription = getDescriptionByName(containerTypeDescriptionName); if (typeDescription == null) throw new ContainerCreateException("Container type description with name=" + containerTypeDescriptionName + " not found. This may indicate that the desired provider is not available or not startable within runtime."); //$NON-NLS-1$ //$NON-NLS-2$ return typeDescription; }
protected BaseContainer(long idl) throws ContainerCreateException { try { this.id = IDFactory.getDefault().createLongID(idl); } catch (IDCreateException e) { throw new ContainerCreateException("Could not create ID for basecontainer", e); //$NON-NLS-1$ } }
public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException { try { if (parameters != null && parameters.length > 0) { if (parameters[0] instanceof ID) return new BaseContainer((ID) parameters[0]); if (parameters[0] instanceof String) return new BaseContainer(IDFactory.getDefault().createStringID((String) parameters[0])); } } catch (IDCreateException e) { throw new ContainerCreateException("Could not create ID for basecontainer"); //$NON-NLS-1$ } return new BaseContainer(nextBaseContainerID++); }