1 package org.pojomatic;
2
3 import java.lang.reflect.AnnotatedElement;
4
5 /**
6 * A "property" on a class. In this context, all a property is is a means of obtaining a value from
7 * an instance.
8 */
9 public interface PropertyElement {
10
11 /**
12 * Get the name of this property.
13 * @return the name of this property.
14 */
15 String getName();
16
17 /**
18 * Get the original annotated element that this property is derived from.
19 * @return the original annotated element that this property is derived from.
20 */
21 AnnotatedElement getElement();
22
23 /**
24 * Get the class object representing the class or interface declaring this property.
25 * @return the declaring class or interface of this property.
26 */
27 Class<?> getDeclaringClass();
28
29 /**
30 * Get the name of the underlying field or method.
31 * @return the name of the underlying field or method.
32 */
33 String getElementName();
34
35 /**
36 * Get the type of element returns either "field" or "method".
37 * @return the type of element.
38 */
39 String getType();
40
41
42 /**
43 * Get the type of this property - the return type of a method, or the type of a field
44 * @return the type of this property
45 */
46 Class<?> getPropertyType();
47 }