/** * Creates and registers a component type that has not been registered yet. * * @param namedIdentifier * The identifier of the new component type. * @param fullqualifiedName * The fully qualfieid name of the new component type. * * @return the created component type */ public final ComponentType createAndRegisterComponentType(final String namedIdentifier, final String fullqualifiedName) { final ComponentType newInst; synchronized (this) { if (this.componentTypesByName.containsKey(namedIdentifier)) { throw new IllegalArgumentException("Element with name " + namedIdentifier + "exists already"); } final int id = this.getAndIncrementNextId(); newInst = new ComponentType(id, fullqualifiedName); this.componentTypesById.put(id, newInst); this.componentTypesByName.put(namedIdentifier, newInst); } return newInst; }