nl.tudelft.simulation.introspection.beans
Class BeanProperty

java.lang.Object
  extended by nl.tudelft.simulation.introspection.AbstractProperty
      extended by nl.tudelft.simulation.introspection.beans.BeanProperty
All Implemented Interfaces:
Property

public class BeanProperty
extends AbstractProperty
implements Property

The JavaBean TM implementation of the Property interface. See {see BeanIntrospector}for details.

(c) copyright 2002-2005-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
1.1 Apr 15, 2004
Author:
Niels Lang Peter Jacobs

Constructor Summary
protected BeanProperty(Object bean, PropertyDescriptor descriptor)
          constructs a new BeanProperty
 
Method Summary
 Object getInstance()
          Retrieves the introspected object, which contains this Property.
 String getName()
          Retrieves the name of the property.
 Class getType()
          Returns the type of this property's value.
 Object getValue()
          Returns the current value of this property.
 boolean isEditable()
          Returns whether the value of this property may be altered.
protected  void setRegularValue(Object values)
          Method used to set a regular (i.e.
 
Methods inherited from class nl.tudelft.simulation.introspection.AbstractProperty
getComponentType, isCollection, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.tudelft.simulation.introspection.Property
getComponentType, isCollection, setValue
 

Constructor Detail

BeanProperty

protected BeanProperty(Object bean,
                       PropertyDescriptor descriptor)
constructs a new BeanProperty

Parameters:
bean - the bean to introspect
descriptor - the descriptor of the property
Method Detail

getName

public String getName()
Description copied from interface: Property
Retrieves the name of the property.

Specified by:
getName in interface Property
Returns:
The name of the property
See Also:
Property.getName()

getType

public Class getType()
Description copied from interface: Property
Returns the type of this property's value.

Specified by:
getType in interface Property
Returns:
A {see java.lang.Class}instance denoting the type of this property.
See Also:
Property.getType()

setRegularValue

protected void setRegularValue(Object values)
Description copied from class: AbstractProperty
Method used to set a regular (i.e. not-composite) property value.

Specified by:
setRegularValue in class AbstractProperty
Parameters:
values - the new value
See Also:
#setRegularValue(java.lang.Object)

getValue

public Object getValue()
Description copied from interface: Property
Returns the current value of this property.

Specified by:
getValue in interface Property
Returns:
The current value of this property.
See Also:
Property.getValue()

getInstance

public Object getInstance()
Description copied from interface: Property
Retrieves the introspected object, which contains this Property.

Specified by:
getInstance in interface Property
Returns:
the instance
See Also:
Property.getInstance()

isEditable

public boolean isEditable()
Description copied from interface: Property
Returns whether the value of this property may be altered.

Specified by:
isEditable in interface Property
Returns:
'True', when this property's value can be altered, 'false' otherwise.
See Also:
Property.isEditable()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.