| 80 | | AnnotationDesc[] annotationDescs = methodDoc.annotations(); |
|---|
| 81 | | for (AnnotationDesc annotationDesc : annotationDescs) { |
|---|
| 82 | | AnnotationTypeDoc annotationTypeDoc = annotationDesc.annotationType(); |
|---|
| 83 | | fieldType = getAnnotationMap().getType(annotationTypeDoc.qualifiedTypeName(), false, imports); |
|---|
| 84 | | if (fieldType != null) break; |
|---|
| | 80 | fieldType = checkAnnotations(imports, fieldType, methodDoc.annotations()); |
|---|
| | 81 | |
|---|
| | 82 | if (fieldType == null && fieldDoc != null) { |
|---|
| | 83 | fieldType = checkAnnotations(imports, fieldType, fieldDoc.annotations()); |
|---|
| | 95 | } |
|---|
| | 96 | |
|---|
| | 97 | private String checkAnnotations(Collection<String> imports, String fieldType, AnnotationDesc[] annotationDescs) { |
|---|
| | 98 | for (AnnotationDesc annotationDesc : annotationDescs) { |
|---|
| | 99 | AnnotationTypeDoc annotationTypeDoc = annotationDesc.annotationType(); |
|---|
| | 100 | fieldType = getAnnotationMap().getType(annotationTypeDoc.qualifiedTypeName(), false, imports); |
|---|
| | 101 | if (fieldType != null) break; |
|---|
| | 102 | } |
|---|
| | 103 | return fieldType; |
|---|
| | 104 | } |
|---|
| | 105 | |
|---|
| | 106 | private FieldDoc findField(ClassDoc classDoc, String propertyName) { |
|---|
| | 107 | FieldDoc fieldDoc = null; |
|---|
| | 108 | for (FieldDoc doc : classDoc.fields(false)) { |
|---|
| | 109 | if (doc.name().equals(propertyName)) { |
|---|
| | 110 | fieldDoc = doc; |
|---|
| | 111 | break; |
|---|
| | 112 | } |
|---|
| | 113 | } |
|---|
| | 114 | |
|---|
| | 115 | return fieldDoc; |
|---|