com.google.cloud.dataflow.sdk.coders

## Class CoderProviders

- java.lang.Object
- - com.google.cloud.dataflow.sdk.coders.CoderProviders

    public final class CoderProviders
    extends Object

Static utility methods for working with `CoderProviders`.

### Method Summary

All Methods Static Methods Concrete Methods
`static CoderProvider` `firstOf(CoderProvider... coderProviders)` Returns a `CoderProvider` that consults each of the provider `coderProviders` and returns the first `Coder` provided.
`static <T> CoderProvider` `fromStaticMethods(Class<T> clazz)` Creates a `CoderProvider` built from particular static methods of a class that implements `Coder`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### fromStaticMethods

    public static <T> CoderProvider fromStaticMethods(Class<T> clazz)

Creates a `CoderProvider` built from particular static methods of a class that implements `Coder`. The requirements for this method are precisely the requirements for a `Coder` class to be usable with `DefaultCoder` annotations.

The class must have the following static method:

     public static Coder<T> of(TypeDescriptor<T> type)

#### firstOf

    public static CoderProvider firstOf(CoderProvider... coderProviders)

Returns a `CoderProvider` that consults each of the provider `coderProviders` and returns the first `Coder` provided.

Note that the order in which the providers are listed matters: While the set of types handled will be the union of those handled by all of the providers in the list, the actual `Coder` provided by the first successful provider may differ, and may have inferior properties. For example, not all `Coders` are deterministic, handle `null` values, or have comparable performance.