本文整理汇总了Java中com.google.common.collect.Multimap.values方法的典型用法代码示例。如果您正苦于以下问题:Java Multimap.values方法的具体用法?Java Multimap.values怎么用?Java Multimap.values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.Multimap
的用法示例。
在下文中一共展示了Multimap.values方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: determineManagedPropertyType
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private static ModelType<?> determineManagedPropertyType(StructBindingExtractionContext<?> extractionContext, String propertyName, Multimap<PropertyAccessorType, StructMethodBinding> accessorBindings) {
Collection<StructMethodBinding> isGetter = accessorBindings.get(IS_GETTER);
for (StructMethodBinding isGetterBinding : isGetter) {
if (!((ManagedPropertyMethodBinding) isGetterBinding).getDeclaredPropertyType().equals(ModelType.of(Boolean.TYPE))) {
WeaklyTypeReferencingMethod<?, ?> isGetterMethod = isGetterBinding.getViewMethod();
extractionContext.add(isGetterMethod, String.format("it should either return 'boolean', or its name should be '%s()'",
"get" + isGetterMethod.getName().substring(2)));
}
}
Set<ModelType<?>> potentialPropertyTypes = Sets.newLinkedHashSet();
for (StructMethodBinding binding : accessorBindings.values()) {
if (binding.getAccessorType() == SETTER) {
continue;
}
ManagedPropertyMethodBinding propertyBinding = (ManagedPropertyMethodBinding) binding;
potentialPropertyTypes.add(propertyBinding.getDeclaredPropertyType());
}
Collection<ModelType<?>> convergingPropertyTypes = findConvergingTypes(potentialPropertyTypes);
if (convergingPropertyTypes.size() != 1) {
extractionContext.add(propertyName, String.format("it must have a consistent type, but it's defined as %s",
Joiner.on(", ").join(ModelTypes.getDisplayNames(convergingPropertyTypes))));
return convergingPropertyTypes.iterator().next();
}
ModelType<?> propertyType = Iterables.getOnlyElement(convergingPropertyTypes);
for (StructMethodBinding setterBinding : accessorBindings.get(SETTER)) {
ManagedPropertyMethodBinding propertySetterBinding = (ManagedPropertyMethodBinding) setterBinding;
ModelType<?> declaredSetterType = propertySetterBinding.getDeclaredPropertyType();
if (!declaredSetterType.equals(propertyType)) {
extractionContext.add(setterBinding.getViewMethod(), String.format("it should take parameter with type '%s'",
propertyType.getDisplayName()));
}
}
return propertyType;
}
示例2: extractRepoFileDependencies
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
public Collection<IdeExtendedRepoFileDependency> extractRepoFileDependencies(DependencyHandler dependencyHandler, Collection<Configuration> plusConfigurations, Collection<Configuration> minusConfigurations, boolean downloadSources, boolean downloadJavadoc) {
// can have multiple IDE dependencies with same component identifier (see GRADLE-1622)
Multimap<ComponentIdentifier, IdeExtendedRepoFileDependency> resolvedDependenciesComponentMap = LinkedHashMultimap.create();
for (IdeExtendedRepoFileDependency dep : resolvedExternalDependencies(plusConfigurations, minusConfigurations)) {
resolvedDependenciesComponentMap.put(toComponentIdentifier(dep.getId()), dep);
}
List<Class<? extends Artifact>> artifactTypes = new ArrayList<Class<? extends Artifact>>(2);
if (downloadSources) {
artifactTypes.add(SourcesArtifact.class);
}
if (downloadJavadoc) {
artifactTypes.add(JavadocArtifact.class);
}
downloadAuxiliaryArtifacts(dependencyHandler, resolvedDependenciesComponentMap, artifactTypes);
Collection<UnresolvedIdeRepoFileDependency> unresolvedDependencies = unresolvedExternalDependencies(plusConfigurations, minusConfigurations);
Collection<IdeExtendedRepoFileDependency> resolvedDependencies = resolvedDependenciesComponentMap.values();
Collection<IdeExtendedRepoFileDependency> resolvedAndUnresolved = new ArrayList<IdeExtendedRepoFileDependency>(unresolvedDependencies.size() + resolvedDependencies.size());
resolvedAndUnresolved.addAll(resolvedDependencies);
resolvedAndUnresolved.addAll(unresolvedDependencies);
return resolvedAndUnresolved;
}
示例3: invokeInternal
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
@Override
protected void invokeInternal(WorkflowContext ctx, ProgressMonitor monitor,
Issues issues) {
ResourceSet resourceSet = getResourceSet();
// due to some Xcore peculiarity we have to access the IAllContainerState here
// to trigger some lazy init logic
IAllContainersState allContainerState = (IAllContainersState) EcoreUtil.getAdapter(resourceSet.eAdapters(),
IAllContainersState.class);
allContainerState.isEmpty("");
Multimap<String, URI> uris = getPathTraverser().resolvePathes(pathes,
new Predicate<URI>() {
@Override
public boolean apply(URI input) {
return input.fileExtension().equals(XCORE_FILE_EXT);
}
});
List<Resource> resources = new ArrayList<>();
for (URI uri : uris.values()) {
LOGGER.info(uri);
try {
resources.add(parse(uri, resourceSet));
} catch (Exception e) {
LOGGER.error("Problem during loading of resource @ " + uri, e);
}
}
installIndex(resourceSet);
for (Resource r : resources) {
EcoreUtil.resolveAll(r);
for (Diagnostic x : r.getErrors()) {
issues.addError(x.getMessage(), x);
}
}
ctx.set(slot, resources);
}
示例4: assertWatchKeys
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private void assertWatchKeys(Multimap<String, String> watchKeysMap, DeferredResult deferredResult) {
for (String watchKey : watchKeysMap.values()) {
Collection<DeferredResultWrapper> deferredResultWrappers = deferredResults.get(watchKey);
boolean found = false;
for (DeferredResultWrapper wrapper: deferredResultWrappers) {
if (Objects.equals(wrapper.getResult(), deferredResult)) {
found = true;
}
}
assertTrue(found);
}
}
示例5: getGwtTestCaseClassNames
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private static Collection<String> getGwtTestCaseClassNames(final Reflections reflections) {
Store store = reflections.getStore();
Multimap<String, String> multimap = store.get(GwtTestCaseScanner.class);
return multimap.values();
}
示例6: Context
import com.google.common.collect.Multimap; //导入方法依赖的package包/类
private Context(Multimap<AnalyzedRelation, Symbol> outputs, Collection<Field> canBeFetched) {
this.canBeFetched = canBeFetched;
this.skipSymbols = outputs.values();
this.outputs = outputs;
}