com.mangofactory.swagger.models
Class Annotations
java.lang.Object
com.mangofactory.swagger.models.Annotations
public class Annotations
- extends java.lang.Object
|
Method Summary |
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiModelProperty> |
findApiModePropertyAnnotation(java.lang.reflect.AnnotatedElement annotated)
|
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiParam> |
findApiParamAnnotation(java.lang.reflect.AnnotatedElement annotated)
|
static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiResponses> |
findApiResponsesAnnotations(java.lang.reflect.Method method)
|
static
<A extends java.lang.annotation.Annotation>
A |
|
findPropertyAnnotation(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition beanPropertyDefinition,
java.lang.Class<A> annotationClass)
Finds first annotation of the given type on the given bean property and returns it. |
static com.google.common.base.Optional<org.springframework.web.bind.annotation.ResponseStatus> |
findResponseStatusAnnotation(java.lang.reflect.Method method)
|
static boolean |
memberIsUnwrapped(com.fasterxml.jackson.databind.introspect.AnnotatedMember member)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Annotations
public Annotations()
findPropertyAnnotation
public static <A extends java.lang.annotation.Annotation> A findPropertyAnnotation(com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition beanPropertyDefinition,
java.lang.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 property definitionannotationClass - class object representing desired annotation
- Returns:
- first annotation found for property
memberIsUnwrapped
public static boolean memberIsUnwrapped(com.fasterxml.jackson.databind.introspect.AnnotatedMember member)
findApiModePropertyAnnotation
public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiModelProperty> findApiModePropertyAnnotation(java.lang.reflect.AnnotatedElement annotated)
findApiParamAnnotation
public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiParam> findApiParamAnnotation(java.lang.reflect.AnnotatedElement annotated)
findApiResponsesAnnotations
public static com.google.common.base.Optional<com.wordnik.swagger.annotations.ApiResponses> findApiResponsesAnnotations(java.lang.reflect.Method method)
findResponseStatusAnnotation
public static com.google.common.base.Optional<org.springframework.web.bind.annotation.ResponseStatus> findResponseStatusAnnotation(java.lang.reflect.Method method)