View Javadoc

1   package com.atlassian.rest.annotation;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Retention;
5   import java.lang.annotation.RetentionPolicy;
6   import java.lang.annotation.Target;
7   
8   /**
9    * Declares an actual type accepted in the request body by a REST method so that the WADL generator can create JSON schemas.
10   */
11  @Retention(RetentionPolicy.RUNTIME)
12  @Target(ElementType.METHOD)
13  public @interface RequestType
14  {
15      /**
16       * Type of the request body.
17       */
18      Class<?> value();
19  
20      /**
21       * If the request class is generic you are supposed to provide all its generic types here.
22       */
23      Class<?>[] genericTypes() default {};
24  }