/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

  1. package com.google.code.facebookapi;
  2. import java.lang.annotation.ElementType;
  3. import java.lang.annotation.Target;
  4. /**
  5. * Used in the IFacebookRestClient interface to tie together the method call (e.g. friends_get) and its return type.
  6. *
  7. * 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
  8. * aren't tied together. So, the Java API needs to tie the requests and expected response types together using this annotation.
  9. *
  10. * The information specified helps to produce annotation-generated files FacebookXXXRestClient.java for Xml, Json and Jaxb. This annotation allows all the return types to
  11. * be specified in IFacebookRestClient rather than scattered across the concrete adapter .java files.
  12. */
  13. @Target(ElementType.METHOD)
  14. public @interface FacebookReturnType {
  15. Class<?> JSON() default Object.class;
  16. Class<?> JAXB() default Object.class;
  17. Class<?> JAXBList() default Object.class;
  18. }