1 package at.rseiler.spbee.core.pojo;
2
3 import java.io.Serializable;
4
5 /**
6 * Holds the information of a annotation parameter.
7 * <p>
8 * The field value can hold other javax.lang.model.element.* classes.
9 * See: {@link at.rseiler.spbee.core.generator.DtoGenerator.DtoClassGeneratorInstance#addAnnotationParam}
10 * and {@link at.rseiler.spbee.core.generator.DtoGenerator.DtoClassGeneratorInstance#addAnnotationArrayMemberParam}
11 *
12 * @author Reinhard Seiler {@literal <rseiler.developer@gmail.com>}
13 */
14 public class AnnotationValueInfo implements Serializable {
15
16 private static final long serialVersionUID = 5474410388632197978L;
17
18 private final String name;
19 private final Object value;
20 private final String type;
21 private final Kind kind;
22
23 /**
24 * Constructs a new AnnotationValueInfo.
25 *
26 * @param name the name of the annotation parameter
27 * @param value the value of the annotation parameter
28 * @param kind the kind of the annotation parameter
29 */
30 public AnnotationValueInfo(String name, Object value,String type, Kind kind) {
31 this.name = name;
32 this.value = value;
33 this.type = type;
34 this.kind = kind;
35 }
36
37 /**
38 * Returns the name of the annotation parameter.
39 *
40 * @return the name
41 */
42 public String getName() {
43 return name;
44 }
45
46 /**
47 * Returns the value of the parameter.
48 *
49 * @return the value
50 */
51 public Object getValue() {
52 return value;
53 }
54
55 public String getType() {
56 return type;
57 }
58
59 public Kind getKind() {
60 return kind;
61 }
62
63 @Override
64 public String toString() {
65 return "AnnotationValueInfo{" +
66 "name='" + name + '\'' +
67 ", value=" + value +
68 ", type='" + type + '\'' +
69 ", kind=" + kind +
70 '}';
71 }
72
73 public enum Kind {
74 BASIC, ELEMENT, DECLARED_TYPE, LIST
75 }
76
77 }