/** * {@inheritDoc} */ @Override public List<String> getMappingFileNames() { List<String> tmp = CollectionFactory.newList(mappingFilesNames); return Collections.unmodifiableList(tmp); }
/** * {@inheritDoc} */ @Override public List<String> getManagedClassNames() { List<String> tmp = CollectionFactory.newList(managedClassNames); return Collections.<String>unmodifiableList(tmp); }
public ConstructionPlan add(InitializationPlan plan) { if (initializationPlans == null) { initializationPlans = CollectionFactory.newList(); } initializationPlans.add(plan); return this; }
@Override public synchronized List<ServiceActivity> getServiceActivity() { // Need to wrap the values in a new list because // a) we don't want people arbitrarily changing the internal state of // _serviceIdtoServiceStatus // b) values() is Collection and we want to return List // Note: ugly code here to keep Sun compiler happy. List<ServiceActivity> result = CollectionFactory.newList(); result.addAll(serviceIdToServiceStatus.values()); return result; }
public DashboardManagerImpl(ComponentSource componentSource, List<DashboardTab> tabs) { this.componentSource = componentSource; List<String> tabNames = CollectionFactory.newList(); for (DashboardTab tab : tabs) { tabNames.add(tab.tabName); tab2PageName.put(tab.tabName, tab.pageName); } this.tabNames = Collections.unmodifiableList(tabNames); }
private static List<String> sortValues(Collection<?> values) { List<String> result = CollectionFactory.newList(); for (Object v : values) { result.add(String.valueOf(v)); } Collections.sort(result); return Collections.unmodifiableList(result); }
public List<String> getPageNames() { Data data = getData(); List<String> result = CollectionFactory.newList(data.pageClassNameToLogicalName.values()); Collections.sort(result); return result; }
public List<String> getMixinNames() { Data data = getData(); List<String> result = CollectionFactory.newList(data.mixinToClassName.keySet()); Collections.sort(result); return result; }
private Collection<Class> extractServiceDefMarkers(Method method) { Marker annotation = method.getAnnotation(Marker.class); if (annotation == null) return Collections.emptyList(); return CollectionFactory.newList(annotation.value()); }
public void begin() { List<Runnable> beat = CollectionFactory.newList(); stack.push(beat); }
public MasterObjectProviderImpl(List<ObjectProvider> configuration, OperationTracker tracker) { this.configuration = CollectionFactory.newList(configuration); this.tracker = tracker; // Add this special case to the front of the list. this.configuration.add(0, new StaticObjectProvider(OperationTracker.class, tracker)); }
private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList) { IdMatcher matcher = buildMatcherForPattern(patternList); Collection<DependencyNode<T>> result = newList(); for (String id : dependencyNodesById.keySet()) { if (sourceId.equals(id)) continue; if (matcher.matches(id)) result.add(dependencyNodesById.get(id)); } return result; }
private IdMatcher buildMatcherForPattern(String patternList) { List<IdMatcher> matchers = newList(); for (String pattern : patternList.split(",")) { IdMatcher matcher = new IdMatcherImpl(pattern.trim()); matchers.add(matcher); } return matchers.size() == 1 ? matchers.get(0) : new OrIdMatcher(matchers); } }
private Collection<DependencyNode<T>> findDependencies(String sourceId, String patternList) { IdMatcher matcher = buildMatcherForPattern(patternList); Collection<DependencyNode<T>> result = newList(); for (String id : idToDependencyNode.keySet()) { if (sourceId.equals(id)) continue; if (matcher.matches(id)) result.add(idToDependencyNode.get(id)); } return result; }
public PersistentFieldBundle gatherChanges(String pageName) { Collection<PersistentFieldChange> allChanges = CollectionFactory.newList(); for (PersistentFieldStrategy strategy : strategies.values()) { allChanges.addAll(strategy.gatherFieldChanges(pageName)); } return new PersistentFieldBundleImpl(allChanges); }
private static String toJavaClassNames(List<Class> classes) { Class[] asArray = classes.toArray(new Class[classes.size()]); String[] namesArray = PlasticUtils.toTypeNames(asArray); List<String> names = CollectionFactory.newList(namesArray); return InternalUtils.joinSorted(names); }
private static String toJavaClassNames(List<Class> classes) { Class[] asArray = classes.toArray(new Class[classes.size()]); String[] namesArray = PlasticUtils.toTypeNames(asArray); List<String> names = CollectionFactory.newList(namesArray); return InternalUtils.joinSorted(names); }
@Override public List<String> getLabels() { List<String> result = CollectionFactory.newList(configuration); Collections.sort(result); return result; } }
private List<Runnable> getCallbacks() { List<Runnable> result = callbacksValue.get(); if (result == null) { result = CollectionFactory.newList(); callbacksValue.set(result); } return result; }
private SelectModel createSelectModel(List<?> objects, ValueLabelProvider<Object> labelProvider) { final List<OptionModel> options = CollectionFactory.newList(); for (Object object : objects) { String label = labelProvider.getLabel(object); options.add(new OptionModelImpl(label, object)); } return new SelectModelImpl(null, options); } }