Coverage Summary for Class: PropertyInfo (net.sf.persism)
Class |
Class, %
|
Method, %
|
Line, %
|
PropertyInfo |
100%
(1/1)
|
33.3%
(3/9)
|
40%
(4/10)
|
1 package net.sf.persism;
2
3 import java.lang.annotation.Annotation;
4 import java.lang.reflect.Field;
5 import java.lang.reflect.Method;
6 import java.util.HashMap;
7 import java.util.Map;
8
9 /**
10 * Created by IntelliJ IDEA.
11 * User: DHoward
12 * Date: 9/8/11
13 * Time: 8:09 AM
14 */
15 final class PropertyInfo {
16
17 String propertyName;
18 Method getter;
19 Method setter;
20 Field field;
21 boolean readOnly;
22
23 Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>(4);
24
25 Annotation getAnnotation(Class<? extends Annotation> annotationClass) {
26 return annotations.get(annotationClass);
27 }
28
29 // for collections
30 String propertyName() {
31 return propertyName;
32 }
33
34 Method getter() {
35 return getter;
36 }
37
38 Method setter() {
39 return setter;
40 }
41
42 Field field() {
43 return field;
44 }
45
46 boolean readOnly() {
47 return readOnly;
48 }
49
50 Map<Class<? extends Annotation>, Annotation> annotations() {
51 return annotations;
52 }
53
54 @Override
55 public String toString() {
56 return "PropertyInfo{" +
57 "propertyName='" + propertyName + '\'' +
58 ", getter=" + getter +
59 ", setter=" + setter +
60 ", annotations=" + annotations +
61 ", readOnly=" + readOnly +
62 '}';
63 }
64 }