public class FieldProperty extends GenericProperty
A FieldProperty
is a Property
which is accessed as a field, without
going through accessor methods (setX, getX). The field may have any scope (public, package,
protected, private).
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Field |
field |
Constructor and Description |
---|
FieldProperty(java.lang.reflect.Field field) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(java.lang.Object object) |
<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. |
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. |
void |
set(java.lang.Object object,
java.lang.Object value) |
getActualTypeArguments
compareTo, equals, getName, getType, hashCode, isReadable, isWritable, toString
public void set(java.lang.Object object, java.lang.Object value) throws java.lang.Exception
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
Property
List
if there're no
annotations.getAnnotations
in class Property
List
if there're no
annotationspublic <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
Property
null
if it's not present.getAnnotation
in class Property
A
- class of the annotationannotationType
- the type of the annotation to be returnednull
if it's not present