20 package net.sf.gridarta.model.archetypeset;
22 import java.lang.ref.WeakReference;
23 import java.util.Collection;
24 import java.util.Collections;
25 import java.util.HashMap;
26 import java.util.LinkedHashMap;
28 import java.util.concurrent.CopyOnWriteArrayList;
37 import org.jetbrains.annotations.NotNull;
38 import org.jetbrains.annotations.Nullable;
84 private final Collection<ArchetypeSetListener<G, A, R>>
listenerList =
new CopyOnWriteArrayList<>();
116 if (archetype ==
null) {
130 final WeakReference<R> existingUndefinedArchetypeRef =
undefinedArchetypes.get(archetypeName);
131 if (existingUndefinedArchetypeRef !=
null) {
132 final R existingUndefinedArchetype = existingUndefinedArchetypeRef.get();
133 if (existingUndefinedArchetype !=
null) {
134 return existingUndefinedArchetype;
147 final String name = archetype.getArchetypeName();
168 return Collections.unmodifiableCollection(
archetypeMap.values());
190 listener.loadedFromArchiveChanged();
197 archetype.setObjectFace();