public abstract class Property extends java.lang.Object implements java.lang.Comparable<Property>
A Property represents a single member variable of a class, possibly including its
accessor methods (getX, setX). The name stored in this class is the actual name of the property
as given for the class, not an alias.
Objects of this class have a total ordering which defaults to ordering based on the name of the property.
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name |
private java.lang.Class<?> |
type |
| Constructor and Description |
|---|
Property(java.lang.String name,
java.lang.Class<?> type) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Property o) |
boolean |
equals(java.lang.Object other) |
abstract java.lang.Object |
get(java.lang.Object object) |
abstract java.lang.Class<?>[] |
getActualTypeArguments() |
abstract <A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> annotationType)
Returns property's annotation for the given type or
null if it's not present. |
abstract java.util.List<java.lang.annotation.Annotation> |
getAnnotations()
Returns the annotations that are present on this property or empty
List if there're no
annotations. |
java.lang.String |
getName() |
java.lang.Class<?> |
getType() |
int |
hashCode() |
boolean |
isReadable() |
boolean |
isWritable() |
abstract void |
set(java.lang.Object object,
java.lang.Object value) |
java.lang.String |
toString() |
public java.lang.Class<?> getType()
public abstract java.lang.Class<?>[] getActualTypeArguments()
public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Property o)
compareTo in interface java.lang.Comparable<Property>public boolean isWritable()
public boolean isReadable()
public abstract void set(java.lang.Object object,
java.lang.Object value)
throws java.lang.Exception
java.lang.Exceptionpublic abstract java.lang.Object get(java.lang.Object object)
public abstract java.util.List<java.lang.annotation.Annotation> getAnnotations()
List if there're no
annotations.List if there're no
annotationspublic abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
null if it's not present.A - class of the annotationannotationType - the type of the annotation to be returnednull if it's not presentpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Object