# ApiTransformer

com.google.api.server.spi.config

## Annotation Type ApiTransformer

-

  *** ** * ** ***

  <br />

  ```
  @Retention(value=RUNTIME)
  public @interface ApiTransformer
  ```
  An annotation for customizing API output by simple type conversion.


  This can be used in two ways. The first is to annotate a class. This specifies that the
  transformer should be used to convert any objects of this type to the target type. This applies
  to all APIs in the current App Engine application.


  The second is to use [`Api.transformers()`](https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/Api.html#transformers--). This can be used to customize serialization of
  third-party classes, but is not applied globally and is instead done per-API.

  <br />

-
  -

    ### Required Element Summary

    | Modifier and Type | Required Element and Description |
    |---|---|
    | `java.lang.Class<? extends https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/Transformer.html<?,?>>` | `https://docs.cloud.google.com/endpoints/docs/frameworks/java/javadoc/com/google/api/server/spi/config/ApiTransformer.html#value--` The serializer class to do the type conversion. |
    [Required Elements]

-
  -

    ### Element Detail


    -

      #### value

      ```
      public abstract java.lang.Class<? extends Transformer<?,?>> value
      ```
      The serializer class to do the type conversion. It must be possible to create this class using `Class.newInstance()`.