public static class JavaBeanPropertyStyle.JavaBeanProperty extends BaseProperty
We found JavaBeanPropertyStyle to be generally useful outside of any
Inspector. When using it that way, it is also generally useful to have access to
JavaBeanProperty. So this class is public.
| Constructor and Description |
|---|
JavaBeanPropertyStyle.JavaBeanProperty(String name,
String type,
Method readMethod,
Method writeMethod,
Field privateField) |
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present,
else null.
|
String |
getGenericType()
Gets the generic type of the property, or null if the type is not parameterized.
|
Field |
getPrivateField()
Get the private field associated with this JavaBean property.
|
Method |
getReadMethod() |
Method |
getWriteMethod() |
boolean |
isReadable() |
boolean |
isWritable() |
Object |
read(Object obj)
Reads this JavaBeanProperty from the given Object.
|
void |
write(Object obj,
Object value)
Write the property for the given object.
|
getTypegetName, isAnnotationPresent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, isAnnotationPresentpublic boolean isReadable()
public Object read(Object obj)
public boolean isWritable()
public void write(Object obj, Object value)
Property
Used by BeanUtilsBindingProcessor, and is also nicely symmetrical with read.
public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
Trait
Note: for subclasses, whether anything is returned for annotations defined by the superclass
is decided by the java.lang.annotation.Inherited annotation.
public String getGenericType()
Property
Type is returned as a String, so that it can express something other than a
java.lang.Class (eg. javassist.CtClass or
org.jboss.forge.parser.java.JavaClass).
public Method getReadMethod()
public Method getWriteMethod()
public Field getPrivateField()
JavaBeanPropertyStyleConfig.setPrivateFieldConvention has been set. The
returned Field will not be accessible unless
setAccessible( true ) is called.Copyright © 2015. All Rights Reserved.