Returner

The "@Returner" annotation is applied to those methods offered by libraries in which the response of an API request is processed and formatted according to a specific type of format


         //This method is an example returner method
         //ReturnFormat is for the example, but could be any type of formatter
        
        private <T> T returnResponseFormatted(T responseDetails, ReturnFormat format) {
             switch (format) {
                 case JSON:
                      return // response formatted as JSON
                 case LIBRARY_OBJECT:
                      return // response formatted as object given by the library
                 default: // this case is the STRING case
                     return // response formatted as simple string
             }
        }
    

Author

N7ghtm4r3 - Tecknobit

Types

Link copied to clipboard
List of formatters offered by library to format the responses as user wants

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String