Top Description Fields Constructors Methods
com.thoughtworks.xstream.converters.javabean

public Class BeanProperty

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, .Method, .UndeclaredThrowableException

Deprecated

As of 1.3.1, no longer in use

Provide access to a bean property.
Author
Andrea Aime

Field Summary

Modifier and TypeField and Description
private static final Object[]
protected Method
getter

the getter

private Class<T>
memberClass

the target class

private String
propertyName

the property name

private Method
setter

the setter

private Class<T>
type

the property type

Constructor Summary

AccessConstructor and Description
public
BeanProperty(Class<T> memberClass, String propertyName, Class<T> propertyType)

Creates a new BeanPropertythat gets the specified property from the specified class.

Method Summary

Modifier and TypeMethod and Description
public Object
get(Object member)

Gets the value of this property for the specified Object.

public Class<T>
getBeanClass()

Gets the base class that this getter accesses.

public String
getName()

Gets the name of the property that this getter extracts.

public Class<T>
getType()

Returns the property type

public boolean
isReadable()

Gets whether this property can get get.

public boolean
isWritable()

Gets whether this property can be set.

public Object
set(Object member, Object newValue)

Sets the value of this property for the specified Object.

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_ARGSback to summary
private static final Object[] EMPTY_ARGS
getterback to summary
protected Method getter

the getter

memberClassback to summary
private Class<T> memberClass

the target class

propertyNameback to summary
private String propertyName

the property name

setterback to summary
private Method setter

the setter

typeback to summary
private Class<T> type

the property type

Constructor Detail

BeanPropertyback to summary
public BeanProperty(Class<T> memberClass, String propertyName, Class<T> propertyType)

Creates a new BeanPropertythat gets the specified property from the specified class.

Method Detail

getback to summary
public Object get(Object member) throws IllegalArgumentException, IllegalAccessException

Gets the value of this property for the specified Object.

getBeanClassback to summary
public Class<T> getBeanClass()

Gets the base class that this getter accesses.

getNameback to summary
public String getName()

Gets the name of the property that this getter extracts.

getTypeback to summary
public Class<T> getType()

Returns the property type

isReadableback to summary
public boolean isReadable()

Gets whether this property can get get.

isWritableback to summary
public boolean isWritable()

Gets whether this property can be set.

setback to summary
public Object set(Object member, Object newValue) throws IllegalArgumentException, IllegalAccessException

Sets the value of this property for the specified Object.

setGetterMethodback to summary
public void setGetterMethod(Method method)
setSetterMethodback to summary
public void setSetterMethod(Method method)