1 package com.github.mygreen.supercsv.builder;
2
3 import java.lang.annotation.Annotation;
4 import java.util.ArrayList;
5 import java.util.List;
6
7 import com.github.mygreen.supercsv.annotation.CsvComposition;
8
9
10
11
12
13
14
15
16 public class ExpandedAnnotation{
17
18 private final Annotation original;
19
20
21
22
23 private final boolean composed;
24
25
26
27
28 private int index;
29
30
31
32
33 private final List<ExpandedAnnotation> childs = new ArrayList<>();
34
35
36
37
38
39
40 public ExpandedAnnotation(final Annotation original, final boolean composed) {
41 this.original = original;
42 this.composed = composed;
43 }
44
45
46
47
48
49 public Annotation getOriginal() {
50 return original;
51 }
52
53
54
55
56
57
58 public boolean isAnnotationType(final Class<?> clazz) {
59 return original.annotationType().equals(clazz);
60 }
61
62
63
64
65
66 public boolean isComposed() {
67 return composed;
68 }
69
70
71
72
73
74 public List<ExpandedAnnotation> getChilds() {
75 return childs;
76 }
77
78 public void addChilds(final List<ExpandedAnnotation> childs) {
79 this.childs.addAll(childs);
80 }
81
82
83
84
85
86 public int getIndex() {
87 return index;
88 }
89
90
91
92
93
94 public void setIndex(int index) {
95 this.index = index;
96 }
97
98 }