com.mangofactory.swagger.models
Class Annotations

java.lang.Object
  extended by com.mangofactory.swagger.models.Annotations

public class Annotations
extends Object


Constructor Summary
Annotations()
           
 
Method Summary
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiModelProperty> findApiModePropertyAnnotation(AnnotatedElement annotated)
           
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiParam> findApiParamAnnotation(AnnotatedElement annotated)
           
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiResponses> findApiResponsesAnnotations(AnnotatedElement annotated)
           
static
<A extends Annotation>
A
findPropertyAnnotation(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass)
          Finds first annotation of the given type on the given bean property and returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Annotations

public Annotations()
Method Detail

findPropertyAnnotation

public static <A extends Annotation> A findPropertyAnnotation(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition beanPropertyDefinition,
                                                              Class<A> annotationClass)
Finds first annotation of the given type on the given bean property and returns it. Search precedence is getter -> setter -> field.

Type Parameters:
A - type that extends Annotation
Parameters:
beanPropertyDefinition - introspected jackson proprty defintion
annotationClass - class object representing desired annotation
Returns:
first annotation found for property

findApiModePropertyAnnotation

public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiModelProperty> findApiModePropertyAnnotation(AnnotatedElement annotated)

findApiParamAnnotation

public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiParam> findApiParamAnnotation(AnnotatedElement annotated)

findApiResponsesAnnotations

public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiResponses> findApiResponsesAnnotations(AnnotatedElement annotated)


Copyright © May 2012-2014 The Mango Factory. All Rights Reserved.