@XmlTransient public Iterator<? extends MetaDataVisitorNode> getChildren() { Set<MetaDataVisitorNode> children = CollectionsFactory.createLazySet(); addChildren(children); if (children.size() == 0) return null; else return children.iterator(); }
/** * Get the cache for the classloader * * @param cl the classloader * @return the map */ protected Map<String, WeakReference<T>> getClassLoaderCache(ClassLoader cl) { synchronized (cache) { Map<String, WeakReference<T>> result = cache.get(cl); if (result == null) { result = CollectionsFactory.createConcurrentReaderMap(); cache.put(cl, result); } return result; } } }
/** * Default CTOR. * * Create a filter that filters out all notification types. */ public JBossNotificationFilterSupport() { enabledTypes = CollectionsFactory.createCopyOnWriteList(); }
/** * Apply metadata on root to create context. * * @param context the structure context * @param metaDataPaths the metadata paths * @return the context info */ protected ContextInfo applyMetadataPaths(StructureContext context, String[] metaDataPaths) { if (context == null) throw new IllegalArgumentException("Null context"); VirtualFile root = context.getFile(); List<String> metaDataPath = CollectionsFactory.createLazyList(); // Determine whether the metadata paths exists if (metaDataPaths != null && metaDataPaths.length > 0) { for(String path : metaDataPaths) { VirtualFile child = root.getChild(path); if (child.exists()) metaDataPath.add(path); } } // Create and link the context if (metaDataPath.isEmpty()) return StructureMetaDataFactory.createContextInfo("", null); else return StructureMetaDataFactory.createContextInfo("", metaDataPath, null); }
/** * Add optional input. * * @param input the input */ public void addOptionalInput(String input) { addInput(input); // this already checks for null if (optionalInputs == null) optionalInputs = CollectionsFactory.createLazySet(); optionalInputs.add(input); }
public Iterator<? extends ServiceMetaDataVisitorNode> getChildren() { Set<ServiceMetaDataVisitorNode> children = CollectionsFactory.createLazySet(); addChildren(children); if (children.size() == 0) return null; else return children.iterator(); }
public Iterator<? extends ServiceMetaDataVisitorNode> getChildren() { Set<ServiceMetaDataVisitorNode> children = CollectionsFactory.createLazySet(); addChildren(children); if (children.size() == 0) return null; else return children.iterator(); }
@XmlTransient public Iterator<? extends MetaDataVisitorNode> getChildren() { if (enabled != null && enabled.isEmpty() == false) { Set<MetaDataVisitorNode> children = CollectionsFactory.createLazySet(); for (Object element : enabled) { if (element instanceof MetaDataVisitorNode) { children.add(MetaDataVisitorNode.class.cast(element)); } } if (children.isEmpty() == false) return children.iterator(); } return null; } }
if (classes == null) classes = CollectionsFactory.createLazySet(); elements.put(type, classes);
public GroupingStructure() { setRelativeOrder(9000); // before jar structure setRootClasspathEntry(true); // by default root is part of classpath setLibs(Collections.<String>emptySet()); // empty libs setMetaDataPaths(META_INF); // default metadata locations setGroups(CollectionsFactory.<String>createLazySet()); // lazy groups setFilters(Collections.<String, VirtualFileFilter>emptyMap()); // empty filters }
Set<ControllerContext> dependents = CollectionsFactory.createLazySet(); getContexts(item.getName(), dependents); if (dependents.isEmpty() == false)