PageRenderTime 19ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/facebook-java-api/src/main/java/com/google/code/facebookapi/FacebookReturnType.java

http://facebook-java-api.googlecode.com/
Java | 24 lines | 9 code | 6 blank | 9 comment | 0 complexity | 47af2c15da4e9fc8622973295ee8dbe5 MD5 | raw file
 1package com.google.code.facebookapi;
 2
 3import java.lang.annotation.ElementType;
 4import java.lang.annotation.Target;
 5
 6/**
 7 * Used in the IFacebookRestClient interface to tie together the method call (e.g. friends_get) and its return type.
 8 * 
 9 * Facebook provides a human readable description of the API and an XSD schema of the response formats. Without a WADL descriptor for the service, these two concepts
10 * aren't tied together. So, the Java API needs to tie the requests and expected response types together using this annotation.
11 * 
12 * The information specified helps to produce annotation-generated files FacebookXXXRestClient.java for Xml, Json and Jaxb. This annotation allows all the return types to
13 * be specified in IFacebookRestClient rather than scattered across the concrete adapter .java files.
14 */
15@Target(ElementType.METHOD)
16public @interface FacebookReturnType {
17
18	Class<?> JSON() default Object.class;
19
20	Class<?> JAXB() default Object.class;
21
22	Class<?> JAXBList() default Object.class;
23
24}