List of usage examples for com.google.common.collect ImmutableList copyOf
public static <E> ImmutableList<E> copyOf(E[] elements)
From source file:com.google.errorprone.refaster.UModifiers.java
public static UModifiers create(long flagBits, UAnnotation... annotations) { return create(flagBits, ImmutableList.copyOf(annotations)); }
From source file:dagger.internal.codegen.BindingGraphPluginsModule.java
@Provides @Singleton//from www . j ava 2s. c o m static ImmutableList<BindingGraphPlugin> bindingGraphPlugins(Filer filer, @ProcessingOptions Map<String, String> processingOptions) { ClassLoader classLoader = BindingGraphPluginsModule.class.getClassLoader(); ImmutableList<BindingGraphPlugin> bindingGraphPlugins = ImmutableList .copyOf(ServiceLoader.load(BindingGraphPlugin.class, classLoader)); for (BindingGraphPlugin plugin : bindingGraphPlugins) { plugin.setFiler(filer); Set<String> supportedOptions = plugin.getSupportedOptions(); if (!supportedOptions.isEmpty()) { plugin.setOptions(Maps.filterKeys(processingOptions, supportedOptions::contains)); } } return bindingGraphPlugins; }
From source file:com.facebook.presto.sql.tree.QualifiedName.java
public static QualifiedName of(String first, String... rest) { requireNonNull(first, "first is null"); return new QualifiedName(ImmutableList.copyOf(Lists.asList(first, rest))); }
From source file:com.google.errorprone.refaster.UTypeParameter.java
@VisibleForTesting static UTypeParameter create(CharSequence name, UExpression... bounds) { return create(name, ImmutableList.copyOf(bounds), ImmutableList.<UAnnotation>of()); }
From source file:com.google.errorprone.refaster.UAnnotation.java
public static UAnnotation create(UTree<?> annotationType, List<UExpression> arguments) { return new AutoValue_UAnnotation(annotationType, ImmutableList.copyOf(arguments)); }
From source file:extrabiomes.helpers.ForestryModHelper.java
public static Collection<ItemStack> getForesterBackPackItems() { return ImmutableList.copyOf(backpackForester); }
From source file:org.jclouds.b2.domain.ListPartsResponse.java
@SerializedNames({ "nextPartNumber", "parts" }) public static ListPartsResponse create(@Nullable Integer nextPartNumber, List<Entry> parts) { return new AutoValue_ListPartsResponse(nextPartNumber, ImmutableList.copyOf(parts)); }
From source file:io.prestosql.sql.tree.QualifiedName.java
public static QualifiedName of(String first, String... rest) { requireNonNull(first, "first is null"); return of(ImmutableList .copyOf(Lists.asList(first, rest).stream().map(Identifier::new).collect(Collectors.toList()))); }
From source file:com.google.errorprone.refaster.UBlock.java
public static UBlock create(List<UStatement> statements) { return new AutoValue_UBlock(ImmutableList.copyOf(statements)); }