juzu

## Annotation Type MimeType

-     @Retention(value=RUNTIME)
      @Target(value={METHOD,ANNOTATION_TYPE})
      public @interface MimeType

  Associate a program element with a mime type.

  Java controller methods can be annotated with this annotation to associate the controller response with a mime type automatically:

  `

         @MimeType("text/html")
         public Response index() {
           return Response.ok("Hello world");
         }

  `

  t can also transform an existing annotation into a specialized mime type:

  `

         @Retention(RetentionPolicy.RUNTIME)
         @Target({ElementType.METHOD})
         @MimeType("text/html")
         public @interface HTML {
         }

  `

  Such mime type can then be used to annotate controller methods:

  `

         @HTML()
         public Response index() {
           return Response.ok("Hello world");
         }

  `
  Author:
    Julien Viet

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String[]` | `value`

- - ### Element Detail

    - #### value

          public abstract String[] value

      Returns:
        the declarations of matched mime types.

Copyright © 2014 eXo Platform SAS. All rights reserved.