public abstract class Property extends Object implements 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 | Method and Description |
---|---|
int |
compareTo(Property o) |
boolean |
equals(Object other) |
abstract Object |
get(Object object) |
abstract Class<?>[] |
getActualTypeArguments() |
abstract <A extends Annotation> |
getAnnotation(Class<A> annotationType)
Returns property's annotation for the given type or
null if it's not present. |
abstract List<Annotation> |
getAnnotations()
Returns the annotations that are present on this property or empty
List if there're no annotations. |
String |
getName() |
Class<?> |
getType() |
int |
hashCode() |
boolean |
isReadable() |
boolean |
isWritable() |
abstract void |
set(Object object,
Object value) |
String |
toString() |
public Class<?> getType()
public abstract Class<?>[] getActualTypeArguments()
public String getName()
public int compareTo(Property o)
compareTo
in interface Comparable<Property>
public boolean isWritable()
public boolean isReadable()
public abstract List<Annotation> getAnnotations()
List
if there're no annotations.List
if there're no annotationspublic abstract <A extends Annotation> A getAnnotation(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 presentCopyright © 2008–2019. All rights reserved.